mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 14:18:25 +00:00
ignore unsollicited push notif (2nd fix)
This commit is contained in:
parent
f24bce0b10
commit
eb077e7bd7
1 changed files with 6 additions and 3 deletions
|
|
@ -208,7 +208,12 @@
|
|||
}
|
||||
|
||||
- (void)processRemoteNotification:(NSDictionary*)userInfo{
|
||||
if ([LinphoneManager instance].pushNotificationToken==Nil){
|
||||
[LinphoneLogger log:LinphoneLoggerLog format:@"Ignoring push notification we did not subscribed."];
|
||||
}
|
||||
|
||||
NSDictionary *aps = [userInfo objectForKey:@"aps"];
|
||||
|
||||
if(aps != nil) {
|
||||
NSDictionary *alert = [aps objectForKey:@"alert"];
|
||||
if(alert != nil) {
|
||||
|
|
@ -241,9 +246,7 @@
|
|||
|
||||
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
|
||||
[LinphoneLogger log:LinphoneLoggerLog format:@"PushNotification: Receive %@", userInfo];
|
||||
if ([LinphoneManager instance].pushNotificationToken==Nil){
|
||||
[LinphoneLogger log:LinphoneLoggerLog format:@"Ignoring push notification we did not subscribed."];
|
||||
}
|
||||
|
||||
[self processRemoteNotification:userInfo];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue