forked from jmug/stoatchat
Servers: Add invites. Create, view and join.
This commit is contained in:
@@ -197,7 +197,13 @@ pub async fn prehandle_hook(notification: &ClientboundNotification) -> Result<()
|
||||
}
|
||||
}
|
||||
ClientboundNotification::ServerMemberJoin { id, user } => {
|
||||
let server = Ref::from_unchecked(id.clone()).fetch_server().await?;
|
||||
|
||||
subscribe_if_exists(user.clone(), id.clone()).ok();
|
||||
|
||||
for channel in server.channels {
|
||||
subscribe_if_exists(user.clone(), channel).ok();
|
||||
}
|
||||
}
|
||||
ClientboundNotification::ServerCreate(server) => {
|
||||
subscribe_if_exists(server.owner.clone(), server.id.clone()).ok();
|
||||
|
||||
Reference in New Issue
Block a user