From bbe6954ca63cafa4d9dc081b9037cfbbb760d0d2 Mon Sep 17 00:00:00 2001 From: otsmr Date: Sat, 21 Feb 2026 01:28:23 +0100 Subject: [PATCH] Fix: Push notification in groups when someone saves an image --- CHANGELOG.md | 1 + lib/src/services/notifications/pushkeys.notifications.dart | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b976edc..5277a1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - Fix: Increase recent limit in emoji keyboard - Fix: Increase show time of the focus indication - Fix: Quoted text message not shown properly +- Fix: Push notification in groups when someone saves an image ## 0.0.92 diff --git a/lib/src/services/notifications/pushkeys.notifications.dart b/lib/src/services/notifications/pushkeys.notifications.dart index dd319b8..2df0f34 100644 --- a/lib/src/services/notifications/pushkeys.notifications.dart +++ b/lib/src/services/notifications/pushkeys.notifications.dart @@ -281,6 +281,13 @@ Future getPushNotificationFromEncryptedContent( } if (content.hasMediaUpdate()) { + final msg = await twonlyDB.messagesDao + .getMessageById(content.reaction.targetMessageId) + .getSingleOrNull(); + // These notifications should only be send to the original sender. + if (msg == null || msg.senderId == null || msg.senderId != toUserId) { + return null; + } switch (content.mediaUpdate.type) { case EncryptedContent_MediaUpdate_Type.REOPENED: kind = PushKind.reopenedMedia;