fix npe if message has no self reactions initially

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2022-04-24 21:51:56 +02:00
parent 7eedbb2a6c
commit 6316c709ad
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B

View file

@ -269,7 +269,7 @@ class MessageActionsDialog(
}
private fun sendReaction(message: ChatMessage, emoji: String) {
if (message.reactionsSelf.contains(emoji)) {
if (message.reactionsSelf?.contains(emoji) == true) {
deleteReaction(message, emoji)
} else {
addReaction(message, emoji)