Fix: Push notification in groups when someone saves an image

This commit is contained in:
otsmr 2026-02-21 01:28:23 +01:00
parent 3bb2620369
commit bbe6954ca6
2 changed files with 8 additions and 0 deletions

View file

@ -11,6 +11,7 @@
- Fix: Increase recent limit in emoji keyboard - Fix: Increase recent limit in emoji keyboard
- Fix: Increase show time of the focus indication - Fix: Increase show time of the focus indication
- Fix: Quoted text message not shown properly - Fix: Quoted text message not shown properly
- Fix: Push notification in groups when someone saves an image
## 0.0.92 ## 0.0.92

View file

@ -281,6 +281,13 @@ Future<PushNotification?> getPushNotificationFromEncryptedContent(
} }
if (content.hasMediaUpdate()) { 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) { switch (content.mediaUpdate.type) {
case EncryptedContent_MediaUpdate_Type.REOPENED: case EncryptedContent_MediaUpdate_Type.REOPENED:
kind = PushKind.reopenedMedia; kind = PushKind.reopenedMedia;