mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-17 15:09:31 +02:00
Restore the pushkit token after login/logout when configuring PushKit
This commit is contained in:
@@ -266,6 +266,15 @@ Matrix session observer used to detect new opened sessions.
|
||||
- (void)configurePushKit
|
||||
{
|
||||
MXLogDebug(@"[PushNotificationService] configurePushKit")
|
||||
NSData* token = [_pushRegistry pushTokenForType:PKPushTypeVoIP];
|
||||
if (token) {
|
||||
// If the token is available, store it. This can happen if you sign out and back in.
|
||||
// i.e We are registered, but we have cleared it form the the store on logout and the
|
||||
// _pushRegistry lives through signin/signout as PushNotificationService is a singleton
|
||||
// on app delegate.
|
||||
_pushNotificationStore.pushKitToken = token;
|
||||
MXLogDebug(@"[PushNotificationService] configurePushKit: Restored pushKit token")
|
||||
}
|
||||
|
||||
_pushRegistry.delegate = self;
|
||||
_pushRegistry.desiredPushTypes = [NSSet setWithObject:PKPushTypeVoIP];
|
||||
|
||||
Reference in New Issue
Block a user