mirror of
https://github.com/vishalxl/nostr_console.git
synced 2025-12-02 00:37:30 +01:00
added option to print a particular users all tweet only in other menu
This commit is contained in:
@@ -464,4 +464,22 @@ String getRelayOfUser(String userPubkey, String contactPubkey) {
|
||||
}
|
||||
// if not found return empty string
|
||||
return relay;
|
||||
}
|
||||
|
||||
// returns full public key of given username ( or first few letters of id)
|
||||
Set<String> getPublicKeyFromName(String userName) {
|
||||
Set<String> pubkeys = {};
|
||||
|
||||
|
||||
gKindONames.forEach((key, value) {
|
||||
if( userName == value) {
|
||||
pubkeys.add(key);
|
||||
}
|
||||
|
||||
if( key.substring(0, userName.length) == userName) {
|
||||
pubkeys.add(key);
|
||||
}
|
||||
});
|
||||
|
||||
return pubkeys;
|
||||
}
|
||||
Reference in New Issue
Block a user