Browse Source

Nextcloud-NotificationServiceExtension

Marino Faggiana 6 years ago
parent
commit
3342a60b3c

+ 0 - 1
iOSClient/AppDelegate.m

@@ -429,7 +429,6 @@
 
 -(void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(nonnull UNNotificationResponse *)response withCompletionHandler:(nonnull void (^)(void))completionHandler
 {
-    //Called to let your app know which action was selected by the user for a given notification.
     NSString *message = [response.notification.request.content.userInfo objectForKey:@"subject"];
     
     if (message && [NCPushNotificationEncryption sharedInstance].ncPNPrivateKey) {

+ 1 - 1
iOSClient/Brand/Notification_Service_Extension.plist

@@ -5,7 +5,7 @@
 	<key>CFBundleDevelopmentRegion</key>
 	<string>$(DEVELOPMENT_LANGUAGE)</string>
 	<key>CFBundleDisplayName</key>
-	<string>Nextcloud</string>
+	<string>Nextcloud-NotificationServiceExtension</string>
 	<key>CFBundleExecutable</key>
 	<string>$(EXECUTABLE_NAME)</string>
 	<key>CFBundleIdentifier</key>

+ 3 - 2
iOSClient/PushNotification/NCPushNotification.m

@@ -11,7 +11,8 @@
 @implementation NCPushNotification
 
 NSString * const kNCPNAppKey            = @"app";
-NSString * const kNCPNAppIdComments     = @"comments";
+NSString * const kNCPNAppIdKey          = @"spreed";
+NSString * const kNCPNAppIdKeyComments  = @"comments";
 NSString * const kNCPNTypeKey           = @"type";
 NSString * const kNCPNSubjectKey        = @"subject";
 NSString * const kNCPNIdKey             = @"id";
@@ -35,7 +36,7 @@ NSString * const NCPushNotificationJoinVideoCallAcceptedNotification    = @"NCPu
     id jsonDict = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
     
     NSString *app = [jsonDict objectForKey:kNCPNAppKey];
-    if (![app isEqualToString:kNCPNAppIdComments]) {
+    if (![app isEqualToString:kNCPNAppIdKeyComments]) {
         return nil;
     }