commit 8f699e39020422f18a77dc6f0b0c9f373572a9a2 parent 4a7c7d71bc6a7b66396899625661ac86c0543ee0 Author: rhunk <101876869+rhunk@users.noreply.github.com> Date: Sun, 15 Oct 2023 23:07:09 +0200 feat(notification_blacklist): reactions Diffstat:
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/common/src/main/assets/lang/en_US.json b/common/src/main/assets/lang/en_US.json @@ -635,6 +635,9 @@ "snap": "Snap", "typing": "Typing", "stories": "Stories", + "chat_reaction": "Chat Reaction", + "snap_reaction": "Snap Reaction", + "voicenote_reaction": "Voice note Reaction", "initiate_audio": "Incoming Audio Call", "abandon_audio": "Missed Audio Call", "initiate_video": "Incoming Video Call", diff --git a/common/src/main/kotlin/me/rhunk/snapenhance/common/data/SnapEnums.kt b/common/src/main/kotlin/me/rhunk/snapenhance/common/data/SnapEnums.kt @@ -20,6 +20,9 @@ enum class NotificationType ( CHAT_REPLY("chat_reply",true), TYPING("typing", true), STORIES("stories",true), + CHAT_REACTION("chat_reaction", true), + SNAP_REACTION("snap_reaction", true), + VOICENOTE_REACTION("voicenote_reaction", true), INITIATE_AUDIO("initiate_audio",true), ABANDON_AUDIO("abandon_audio", false, ContentType.STATUS_CALL_MISSED_AUDIO), INITIATE_VIDEO("initiate_video",true), diff --git a/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/messaging/Notifications.kt b/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/messaging/Notifications.kt @@ -354,7 +354,10 @@ class Notifications : Feature("Notifications", loadParams = FeatureLoadParams.IN context.log.debug("received message type: $messageType") - if (states.contains(messageType.replaceFirst("mischief_", ""))) { + if (states.contains(messageType.replaceFirst("mischief_", "") + .replaceFirst("group_your_", "") + .replaceFirst("group_other_", "")) + ) { param.setResult(null) } }