Skip to content

Commit 6470ad3

Browse files
Raise OnNotificationOpened and OnNotificationReceived events only for notifications.
1 parent 236ab48 commit 6470ad3

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

sdk/Notifo.SDK.FirebasePlugin/PluginEventsProvider.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,14 @@ private void FirebasePushNotification_OnNotificationOpened(object source, Fireba
6262
protected virtual void OnNotificationOpenedEvent(NotificationEventArgs args) =>
6363
OnNotificationOpened?.Invoke(this, args);
6464

65-
private bool IsNotificationData(IDictionary<string, object> data) =>
66-
data?.ContainsKey(Constants.IdKey) ?? false;
65+
private bool IsNotificationData(IDictionary<string, object> data)
66+
{
67+
if (data == null)
68+
{
69+
return false;
70+
}
71+
72+
return data.ContainsKey(Constants.SubjectKey) || data.ContainsKey(Constants.ApsAlertTitleKey);
73+
}
6774
}
6875
}

0 commit comments

Comments
 (0)