1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2025-06-21 00:45:18 +00:00

Unregister user when removing him

This commit is contained in:
2021-03-07 19:30:02 +01:00
parent 7ae8fb2fad
commit 0f4b7af449
5 changed files with 52 additions and 1 deletions

View File

@ -488,6 +488,9 @@ pub fn remove_member(user_id: &UserID, conv_id: ConvID, remover: &UserID) -> Res
))?;
}
// Propagate event
events_helper::propagate_event(&Event::RemovedUserFromConversation(user_id, conv_id))?;
Ok(())
}

View File

@ -38,6 +38,9 @@ pub enum Event<'a> {
/// Deleted a conversation message
DeleteConversationMessage(&'a ConversationMessage),
/// Removed a user from a conversation
RemovedUserFromConversation(&'a UserID, ConvID),
/// Created a new comment
NewComment(&'a Comment),