1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2025-06-19 16:15:16 +00:00

Propagate the deletion of a conversation message

This commit is contained in:
2020-04-03 08:56:39 +02:00
parent 5503d1af0b
commit 2465b0c1ac
3 changed files with 26 additions and 1 deletions

View File

@ -709,6 +709,11 @@ export class ConversationsHelper {
ID: m.id
}
)
// Notify system
await EventsHelper.Emit("conv_message_deleted", {
message: m
})
}
/**

View File

@ -34,6 +34,11 @@ export interface UpdatedConversationMessageEvent {
msgId: number
}
// When a conversation message was deleted
export interface DeletedConversationMessageEvent {
message: ConversationMessage
}
// When a comment is created
export interface CommentCreatedEvent {
comment: Comment
@ -58,6 +63,7 @@ export interface EventsMap {
"updated_number_unread_conversations": UpdateNumberUnreadConversationsEvent,
"sent_conversation_message": SentNewConversationMessageEvent,
"conv_message_updated": UpdatedConversationMessageEvent,
"conv_message_deleted": DeletedConversationMessageEvent,
"comment_created": CommentCreatedEvent,
"comment_updated": CommentUpdatedEvent,
"comment_deleted": CommentDeletedEvent,