Implement channel changes for messages
This commit is contained in:
parent
51cf6a5ff3
commit
1d5b665f13
12 changed files with 212 additions and 28 deletions
|
@ -464,10 +464,14 @@ impl Database {
|
|||
}
|
||||
|
||||
let mut channels_with_changed_notes = HashSet::default();
|
||||
let mut channels_with_new_messages = HashSet::default();
|
||||
for channel in graph.channels.iter() {
|
||||
if self.has_note_changed(user_id, channel.id, tx).await? {
|
||||
channels_with_changed_notes.insert(channel.id);
|
||||
}
|
||||
if self.has_new_message(channel.id, user_id, tx).await? {
|
||||
channels_with_new_messages.insert(channel.id);
|
||||
}
|
||||
}
|
||||
|
||||
Ok(ChannelsForUser {
|
||||
|
@ -475,6 +479,7 @@ impl Database {
|
|||
channel_participants,
|
||||
channels_with_admin_privileges,
|
||||
channels_with_changed_notes,
|
||||
channels_with_new_messages,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue