prevent NPE when adding the very first own reaction to a message

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2022-04-21 13:19:52 +02:00 committed by Marcel Hibbe
parent 55a48585a7
commit 9ec7feaaee
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B

View File

@ -2746,6 +2746,10 @@ class ChatController(args: Bundle) :
message.reactions = LinkedHashMap()
}
if (message.reactionsSelf == null) {
message.reactionsSelf = ArrayList<String>()
}
var amount = message.reactions[emoji]
if (amount == null) {
amount = 0