Update cached channel state from notifications.

This commit is contained in:
Paul Makles committed 2020-08-10 15:29:48 +02:00
1 parent d95982fb54
commit aba0db268a
3 files changed
+53 -29

No files matched your search

+4
View File
@@ -38,4 +38,8 @@ impl Notification {
unreachable!()
}
}
pub fn push_to_cache(&self) {
crate::database::channel::process_event(&self);
}
}
+2
View File
@@ -17,6 +17,8 @@ pub fn send_message<U: Into<Option<Vec<String>>>, G: Into<Option<String>>>(
let users = users.into();
let guild = guild.into();
data.push_to_cache();
if pubsub::send_message(users.clone(), guild.clone(), data.clone()) {
state::send_message(users, guild, data.serialize());