mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-03-03 13:36:47 +00:00
Fix: Push notification in groups when someone saves an image
This commit is contained in:
parent
3bb2620369
commit
bbe6954ca6
2 changed files with 8 additions and 0 deletions
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue