Merge pull request #1943 from nextcloud/bugfix/noid/fixReactionsNPE

Fix npe if message has no self reactions initially
This commit is contained in:
Andy Scherzinger 2022-04-24 21:54:07 +02:00 committed by GitHub
commit b9726b25b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)