add system messages for reactions

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2022-03-29 18:08:18 +02:00
parent 6c5614fab7
commit 2986f7c3a5
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B
2 changed files with 15 additions and 1 deletions

View File

@ -90,6 +90,8 @@ public class ChatMessage implements MessageContentType, MessageContentType.Image
public Enum<ReadStatus> readStatus = ReadStatus.NONE; public Enum<ReadStatus> readStatus = ReadStatus.NONE;
@JsonField(name = "messageType") @JsonField(name = "messageType")
public String messageType; public String messageType;
@JsonField(name = "reactions")
public HashMap<String, Integer> reactions;
public boolean isDownloadingVoiceMessage; public boolean isDownloadingVoiceMessage;
public boolean resetVoiceMessage; public boolean resetVoiceMessage;
@ -657,6 +659,9 @@ public class ChatMessage implements MessageContentType, MessageContentType.Image
MATTERBRIDGE_CONFIG_REMOVED, MATTERBRIDGE_CONFIG_REMOVED,
MATTERBRIDGE_CONFIG_ENABLED, MATTERBRIDGE_CONFIG_ENABLED,
MATTERBRIDGE_CONFIG_DISABLED, MATTERBRIDGE_CONFIG_DISABLED,
CLEARED_CHAT CLEARED_CHAT,
REACTION,
REACTION_DELETED,
REACTION_REVOKED
} }
} }

View File

@ -65,6 +65,9 @@ import com.nextcloud.talk.models.json.chat.ChatMessage.SystemMessageType.MODERAT
import com.nextcloud.talk.models.json.chat.ChatMessage.SystemMessageType.OBJECT_SHARED import com.nextcloud.talk.models.json.chat.ChatMessage.SystemMessageType.OBJECT_SHARED
import com.nextcloud.talk.models.json.chat.ChatMessage.SystemMessageType.PASSWORD_REMOVED import com.nextcloud.talk.models.json.chat.ChatMessage.SystemMessageType.PASSWORD_REMOVED
import com.nextcloud.talk.models.json.chat.ChatMessage.SystemMessageType.PASSWORD_SET import com.nextcloud.talk.models.json.chat.ChatMessage.SystemMessageType.PASSWORD_SET
import com.nextcloud.talk.models.json.chat.ChatMessage.SystemMessageType.REACTION
import com.nextcloud.talk.models.json.chat.ChatMessage.SystemMessageType.REACTION_DELETED
import com.nextcloud.talk.models.json.chat.ChatMessage.SystemMessageType.REACTION_REVOKED
import com.nextcloud.talk.models.json.chat.ChatMessage.SystemMessageType.READ_ONLY import com.nextcloud.talk.models.json.chat.ChatMessage.SystemMessageType.READ_ONLY
import com.nextcloud.talk.models.json.chat.ChatMessage.SystemMessageType.READ_ONLY_OFF import com.nextcloud.talk.models.json.chat.ChatMessage.SystemMessageType.READ_ONLY_OFF
import com.nextcloud.talk.models.json.chat.ChatMessage.SystemMessageType.USER_ADDED import com.nextcloud.talk.models.json.chat.ChatMessage.SystemMessageType.USER_ADDED
@ -161,6 +164,9 @@ class EnumSystemMessageTypeConverter : StringBasedTypeConverter<ChatMessage.Syst
"matterbridge_config_enabled" -> return MATTERBRIDGE_CONFIG_ENABLED "matterbridge_config_enabled" -> return MATTERBRIDGE_CONFIG_ENABLED
"matterbridge_config_disabled" -> return MATTERBRIDGE_CONFIG_DISABLED "matterbridge_config_disabled" -> return MATTERBRIDGE_CONFIG_DISABLED
"history_cleared" -> return CLEARED_CHAT "history_cleared" -> return CLEARED_CHAT
"reaction" -> return REACTION
"reaction_deleted" -> return REACTION_DELETED
"reaction_revoked" -> return REACTION_REVOKED
else -> return DUMMY else -> return DUMMY
} }
} }
@ -214,6 +220,9 @@ class EnumSystemMessageTypeConverter : StringBasedTypeConverter<ChatMessage.Syst
MATTERBRIDGE_CONFIG_ENABLED -> return "matterbridge_config_enabled" MATTERBRIDGE_CONFIG_ENABLED -> return "matterbridge_config_enabled"
MATTERBRIDGE_CONFIG_DISABLED -> return "matterbridge_config_disabled" MATTERBRIDGE_CONFIG_DISABLED -> return "matterbridge_config_disabled"
CLEARED_CHAT -> return "clear_history" CLEARED_CHAT -> return "clear_history"
REACTION -> return "reaction"
REACTION_DELETED -> return "reaction_deleted"
REACTION_REVOKED -> return "reaction_revoked"
else -> return "" else -> return ""
} }
} }