From 74314e08acea35d5e6271e98cc58daaadffb09be Mon Sep 17 00:00:00 2001 From: Cody Henthorne Date: Fri, 18 Nov 2022 14:31:26 -0500 Subject: [PATCH] Show notification when mentioned in a group story reply. --- .../notifications/v2/NotificationStateProvider.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/notifications/v2/NotificationStateProvider.kt b/app/src/main/java/org/thoughtcrime/securesms/notifications/v2/NotificationStateProvider.kt index 0901216e59..6328782c97 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/notifications/v2/NotificationStateProvider.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/notifications/v2/NotificationStateProvider.kt @@ -131,7 +131,12 @@ object NotificationStateProvider { ) { private val isGroupStoryReply: Boolean = thread.groupStoryId != null private val isUnreadIncoming: Boolean = isUnreadMessage && !messageRecord.isOutgoing && !isGroupStoryReply - private val isNotifiableGroupStoryMessage: Boolean = isUnreadMessage && !messageRecord.isOutgoing && isGroupStoryReply && (isParentStorySentBySelf || (hasSelfRepliedToStory && !messageRecord.isStoryReaction())) + + private val isNotifiableGroupStoryMessage: Boolean = + isUnreadMessage && + !messageRecord.isOutgoing && + isGroupStoryReply && + (isParentStorySentBySelf || messageRecord.hasSelfMention() || (hasSelfRepliedToStory && !messageRecord.isStoryReaction())) fun includeMessage(notificationProfile: NotificationProfile?): MessageInclusion { return if (isUnreadIncoming || stickyThread || isNotifiableGroupStoryMessage) {