From 0ce59fc5ad3ec3fc4bcfc51db231744c82186073 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sat, 6 Feb 2021 10:07:02 +0100 Subject: [PATCH] Propagate an event when deleting a conversation message --- src/controllers/conversations_controller.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/controllers/conversations_controller.rs b/src/controllers/conversations_controller.rs index faf2a74..7640f93 100644 --- a/src/controllers/conversations_controller.rs +++ b/src/controllers/conversations_controller.rs @@ -360,7 +360,14 @@ pub fn handle_event(e: &events_helper::Event) -> Res { )?; } - Event::DeleteConversationMessage(msg) => {} + Event::DeleteConversationMessage(msg) => { + user_ws_controller::send_message_to_specific_connections( + |f| f.conversations.contains(&msg.conv_id), + |_| UserWsMessage::no_id_message("deleted_conv_message", ConversationMessageAPI::new(msg)), + None:: _>, + )?; + } + _ => {} }