New Feature: Add server-side channel unreads.
This commit is contained in:
@@ -63,7 +63,7 @@ pub enum ClientboundNotification {
|
||||
Ready {
|
||||
users: Vec<User>,
|
||||
servers: Vec<Server>,
|
||||
channels: Vec<Channel>,
|
||||
channels: Vec<Channel>
|
||||
},
|
||||
|
||||
Message(Message),
|
||||
@@ -103,6 +103,11 @@ pub enum ClientboundNotification {
|
||||
id: String,
|
||||
user: String,
|
||||
},
|
||||
ChannelAck {
|
||||
id: String,
|
||||
user: String,
|
||||
message_id: String
|
||||
},
|
||||
|
||||
ServerUpdate {
|
||||
id: String,
|
||||
|
||||
@@ -113,6 +113,6 @@ pub async fn generate_ready(mut user: User) -> Result<ClientboundNotification> {
|
||||
Ok(ClientboundNotification::Ready {
|
||||
users,
|
||||
servers,
|
||||
channels,
|
||||
channels
|
||||
})
|
||||
}
|
||||
|
||||
@@ -244,7 +244,8 @@ pub fn publish(ids: Vec<String>, notification: ClientboundNotification) {
|
||||
// Block certain notifications from reaching users that aren't meant to see them.
|
||||
match ¬ification {
|
||||
ClientboundNotification::UserRelationship { id: user_id, .. }
|
||||
| ClientboundNotification::UserSettingsUpdate { id: user_id, .. } => {
|
||||
| ClientboundNotification::UserSettingsUpdate { id: user_id, .. }
|
||||
| ClientboundNotification::ChannelAck { user: user_id, .. } => {
|
||||
if &id != user_id {
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user