File tree Expand file tree Collapse file tree
libs/SalesforceSDKCore/SalesforceSDKCore/Classes/PushNotification Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -276,7 +276,7 @@ public class PushNotificationManager: NSObject {
276276
277277 Task {
278278 do {
279- try await self . fetchAndStoreNotificationTypes ( restClient: restClient)
279+ try await self . fetchAndStoreNotificationTypes ( restClient: restClient, account : user )
280280 } catch {
281281 SFSDKCoreLogger . e ( Self . self, message: " Get Notification Types Error: \( error. localizedDescription) " )
282282 }
@@ -360,10 +360,12 @@ public class PushNotificationManager: NSObject {
360360 ///
361361 /// - Parameters:
362362 /// - restClient: The `RestClient` to use for the API call.
363+ /// - account: The user account to associate notification types with.
363364 /// - Throws: An error if the types cannot be retrieved from server or cache.
364- @objc ( fetchAndStoreNotificationTypesWithRestClient: completionHandler: )
365- public func fetchAndStoreNotificationTypes( restClient: RestClient = RestClient . shared) async throws {
366- guard let account = UserAccountManager . shared. currentUserAccount else {
365+ @objc ( fetchAndStoreNotificationTypesWithRestClient: account: completionHandler: )
366+ public func fetchAndStoreNotificationTypes( restClient: RestClient = RestClient . shared,
367+ account: UserAccount ? = UserAccountManager . shared. currentUserAccount) async throws {
368+ guard let account = account else {
367369 throw PushNotificationManagerError . currentUserNotDetected
368370 }
369371
You can’t perform that action at this time.
0 commit comments