display_name

This commit is contained in:
Doug Hoyte
2024-12-19 20:47:38 -05:00
parent 55f637a2f0
commit 7882f8baa9

View File

@ -62,9 +62,14 @@ struct User {
kind0Json = loadKindJson(txn, decomp, 0);
try {
if (kind0Json) username = kind0Json->at("name").get_string();
} catch (std::exception &e) {
if (kind0Json) {
try {
username = kind0Json->at("name").get_string();
} catch (std::exception &e) {}
try {
if (!username.size()) username = kind0Json->at("display_name").get_string();
} catch (std::exception &e) {}
}
if (username.size() == 0) username = to_hex(pubkey.substr(0,4));