wip: refactor

This commit is contained in:
reya
2025-01-12 15:53:44 +07:00
parent 923966fb95
commit a9d109486e
6 changed files with 124 additions and 147 deletions
+1 -4
View File
@@ -162,10 +162,7 @@ impl ChatRegistry {
self.inbox.update(cx, |this, cx| {
if let Some(room) = this.rooms.iter().find(|room| {
let room = room.read(cx);
let mut all_keys: Vec<_> = room.members.iter().map(|m| m.public_key()).collect();
all_keys.push(room.owner.public_key());
let all_keys = room.read(cx).get_all_keys();
compare(&all_keys, &pubkeys)
}) {
room.update(cx, |this, cx| {