feat: improve search and handle input in compose (#67)
* feat: support search by npub or nprofile * . * . * . * chore: prevent update local search with empty result * clean up * .
This commit is contained in:
@@ -144,6 +144,15 @@ impl ChatRegistry {
|
||||
.collect()
|
||||
}
|
||||
|
||||
/// Search rooms by public keys.
|
||||
pub fn search_by_public_key(&self, public_key: PublicKey, cx: &App) -> Vec<Entity<Room>> {
|
||||
self.rooms
|
||||
.iter()
|
||||
.filter(|room| room.read(cx).members.contains(&public_key))
|
||||
.cloned()
|
||||
.collect()
|
||||
}
|
||||
|
||||
/// Load all rooms from the lmdb.
|
||||
///
|
||||
/// This method:
|
||||
|
||||
Reference in New Issue
Block a user