diff --git a/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist b/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist index e854e877..22741ed5 100644 --- a/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist @@ -7,7 +7,7 @@ AppShared.xcscheme_^#shared#^_ orderHint - 29 + 28 CoreDataStack.xcscheme_^#shared#^_ @@ -97,7 +97,7 @@ MastodonIntent.xcscheme_^#shared#^_ orderHint - 28 + 30 MastodonIntents.xcscheme_^#shared#^_ @@ -117,7 +117,7 @@ ShareActionExtension.xcscheme_^#shared#^_ orderHint - 30 + 29 SuppressBuildableAutocreation diff --git a/Mastodon/Coordinator/SceneCoordinator.swift b/Mastodon/Coordinator/SceneCoordinator.swift index a72f8628..c8ce4acb 100644 --- a/Mastodon/Coordinator/SceneCoordinator.swift +++ b/Mastodon/Coordinator/SceneCoordinator.swift @@ -45,7 +45,7 @@ final public class SceneCoordinator { return Just(nil).eraseToAnyPublisher() } - let accessToken = pushNotification._accessToken // use raw accessToken value without normalize + let accessToken = pushNotification.accessToken // use raw accessToken value without normalize if currentActiveAuthenticationBox.userAuthorization.accessToken == accessToken { // do nothing if notification for current account return Just(pushNotification).eraseToAnyPublisher() diff --git a/Mastodon/Scene/HomeTimeline/HomeTimelineViewController+DebugAction.swift b/Mastodon/Scene/HomeTimeline/HomeTimelineViewController+DebugAction.swift index b57c4325..d4783045 100644 --- a/Mastodon/Scene/HomeTimeline/HomeTimelineViewController+DebugAction.swift +++ b/Mastodon/Scene/HomeTimeline/HomeTimelineViewController+DebugAction.swift @@ -348,7 +348,7 @@ extension HomeTimelineViewController { else { return } let pushNotification = MastodonPushNotification( - _accessToken: authenticationBox.userAuthorization.accessToken, + accessToken: authenticationBox.userAuthorization.accessToken, notificationID: notificationID, notificationType: notificationType.rawValue, preferredLocale: nil, @@ -372,7 +372,7 @@ extension HomeTimelineViewController { else { return } let pushNotification = MastodonPushNotification( - _accessToken: accessToken, + accessToken: accessToken, notificationID: notificationID, notificationType: notificationType.rawValue, preferredLocale: nil, diff --git a/NotificationService/MastodonNotification.swift b/NotificationService/MastodonNotification.swift index 7d6fb034..7d961f31 100644 --- a/NotificationService/MastodonNotification.swift +++ b/NotificationService/MastodonNotification.swift @@ -9,10 +9,10 @@ import Foundation struct MastodonPushNotification: Codable { - let _accessToken: String - var accessToken: String { - return String.normalize(base64String: _accessToken) - } + let accessToken: String +// var accessToken: String { +// return String.normalize(base64String: _accessToken) +// } let notificationID: Int let notificationType: String @@ -23,7 +23,7 @@ struct MastodonPushNotification: Codable { let body: String enum CodingKeys: String, CodingKey { - case _accessToken = "access_token" + case accessToken = "access_token" case notificationID = "notification_id" case notificationType = "notification_type" case preferredLocale = "preferred_locale" @@ -33,7 +33,7 @@ struct MastodonPushNotification: Codable { } public init( - _accessToken: String, + accessToken: String, notificationID: Int, notificationType: String, preferredLocale: String?, @@ -41,7 +41,7 @@ struct MastodonPushNotification: Codable { title: String, body: String ) { - self._accessToken = _accessToken + self.accessToken = accessToken self.notificationID = notificationID self.notificationType = notificationType self.preferredLocale = preferredLocale