fix to send reaction for message that has no reactions yet

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2022-04-06 17:13:36 +02:00
parent 4670854848
commit 4e727924c2
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B

View File

@ -2722,6 +2722,10 @@ class ChatController(args: Bundle) :
} }
fun updateAdapterAfterSendReaction(message: ChatMessage, emoji: String) { fun updateAdapterAfterSendReaction(message: ChatMessage, emoji: String) {
if (message.reactions == null){
message.reactions = HashMap()
}
var amount = message.reactions[emoji] var amount = message.reactions[emoji]
if (amount == null){ if (amount == null){
amount = 0 amount = 0