Pārlūkot izejas kodu

Fix TalkNotification room token

Get only roomToken if token & message id are present in objectId

Signed-off-by: Henrik Storch <henrik.storch@nextcloud.com>
Henrik Storch 3 gadi atpakaļ
vecāks
revīzija
cc78dec8f7

+ 2 - 2
Nextcloud.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

@@ -113,9 +113,9 @@
         "package": "NCCommunication",
         "repositoryURL": "https://github.com/nextcloud/ios-communication-library/",
         "state": {
-          "branch": null,
+          "branch": "develop",
           "revision": "c8e3eac61a846775d570b1d252612a8d2d02930d",
-          "version": "0.99.3"
+          "version": null
         }
       },
       {

+ 2 - 1
iOSClient/Notification/NCNotification.swift

@@ -241,7 +241,8 @@ class NCNotification: UITableViewController, NCNotificationCellDelegate, NCEmpty
 
     func tapAction(with notification: NCCommunicationNotifications, label: String) {
         if notification.app == "spreed",
-           let talkUrl = URL(string: "nextcloudtalk://open-conversation?server=\(appDelegate.urlBase)&user=\(appDelegate.userId)&withRoomToken=\(notification.objectId)"),
+           let roomToken = notification.objectId.split(separator: "/").first,
+           let talkUrl = URL(string: "nextcloudtalk://open-conversation?server=\(appDelegate.urlBase)&user=\(appDelegate.userId)&withRoomToken=\(roomToken)"),
            UIApplication.shared.canOpenURL(talkUrl) {
             UIApplication.shared.open(talkUrl)
         } else if let actions = notification.actions,