added option to print a particular users all tweet only in other menu

This commit is contained in:
vishalxl
2022-08-22 09:05:23 +05:30
parent ba1edf7dbf
commit ed791c61be
4 changed files with 104 additions and 28 deletions

View File

@@ -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;
}