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

Show who is writing messages

This commit is contained in:
2021-03-13 09:29:54 +01:00
parent 7ccc7a492e
commit d8b2dd2599
4 changed files with 100 additions and 0 deletions

View File

@ -50,6 +50,14 @@ class DeletedCommentEvent {
DeletedCommentEvent(this.commentID);
}
/// Writing message in conversation event
class WritingMessageInConversationEvent {
final int convID;
final int userID;
WritingMessageInConversationEvent(this.convID, this.userID);
}
/// New conversation message
class NewConversationMessageEvent {
final ConversationMessage msg;

View File

@ -144,6 +144,12 @@ class WebSocketHelper {
EventsHelper.emit(DeletedCommentEvent(msg.data));
break;
// A user is writing a new message
case "writing_message_in_conv":
EventsHelper.emit(WritingMessageInConversationEvent(
msg.data["conv_id"], msg.data["user_id"]));
break;
// Created new conversation message
case "new_conv_message":
EventsHelper.emit(NewConversationMessageEvent(