Show emoji reaction messages if target isn't found

This commit is contained in:
Ben Iofel
2025-09-13 17:46:19 -04:00
parent ed63d27511
commit dbecaf12a4
@@ -190,7 +190,6 @@ class EmojiReactionRepositoryImpl @Inject constructor(
) { ) {
if (targetMessage == null) { if (targetMessage == null) {
Timber.w("Cannot remove emoji reaction '${reaction.emoji}': no target message found") Timber.w("Cannot remove emoji reaction '${reaction.emoji}': no target message found")
reactionMessage.isEmojiReaction = true
return return
} }
@@ -229,14 +228,13 @@ class EmojiReactionRepositoryImpl @Inject constructor(
} }
realm.insertOrUpdate(reaction) realm.insertOrUpdate(reaction)
reactionMessage.isEmojiReaction = true
if (targetMessage != null) { if (targetMessage != null) {
reactionMessage.isEmojiReaction = true
targetMessage.emojiReactions.add(reaction) targetMessage.emojiReactions.add(reaction)
Timber.i("Saved emoji reaction: ${reaction.emoji} to message ${targetMessage.id}") Timber.i("Saved emoji reaction: ${reaction.emoji} to message ${targetMessage.id}")
} else { } else {
Timber.w("Saved emoji reaction without target message: ${reaction.emoji}") Timber.w("No target message, cannot save emoji reaction: ${reaction.emoji}")
} }
} }