Update cached channel state from notifications.
This commit is contained in:
@@ -38,4 +38,8 @@ impl Notification {
|
||||
unreachable!()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn push_to_cache(&self) {
|
||||
crate::database::channel::process_event(&self);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user