mirror of
https://github.com/hoytech/strfry.git
synced 2025-06-23 02:48:17 +00:00
display_name
This commit is contained in:
@ -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));
|
||||
|
Reference in New Issue
Block a user