Skip to content

Commit

Permalink
Avoid duplicated notification on firebase message received (#1304)
Browse files Browse the repository at this point in the history
  • Loading branch information
beastoin authored Nov 13, 2024
2 parents e2bc011 + 5a51103 commit cab6888
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/lib/services/notifications.dart
Original file line number Diff line number Diff line change
Expand Up @@ -190,16 +190,19 @@ class NotificationService {
if (noti != null) {
_showForegroundNotification(noti: noti);
}

final notificationType = data['notification_type'];
if (notificationType == 'plugin' || notificationType == 'daily_summary') {
data['from_integration'] = data['from_integration'] == 'true';
_serverMessageStreamController.add(ServerMessage.fromJson(data));
}
return;
}

// Announcement likes
if (noti != null) {
_showForegroundNotification(noti: noti, layout: NotificationLayout.BigText);
return;
}
});
}
Expand Down

0 comments on commit cab6888

Please sign in to comment.