Skip to content
This repository has been archived by the owner on Dec 12, 2022. It is now read-only.

Commit

Permalink
Push notifications: Avoid any automatic deactivation
Browse files Browse the repository at this point in the history
  • Loading branch information
manuroe committed Mar 4, 2020
1 parent 6b8892f commit ec5b56c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ Improvements:
API break:
* MXKRoomBubbleComponent: Add session parameter to init and update method.

Bug fix:
* Push notifications: Avoid any automatic deactivation (vector-im/riot-ios#3017).

Changes in MatrixKit in 0.11.3 (2019-12-05)
==========================================

Expand Down
8 changes: 6 additions & 2 deletions MatrixKit/Models/Account/MXKAccount.m
Original file line number Diff line number Diff line change
Expand Up @@ -1251,9 +1251,13 @@ - (void)refreshPushKitPusher
}
else if (_hasPusherForPushKitNotifications && mxSession)
{
NSLog(@"[MXKAccount][Push] refreshPushKitPusher: Do nothing. User denied notifications (account: %@)", self.mxCredentials.userId);

// XXX: The following code has been commented to avoid automatic deactivation of push notifications

// Turn off pusher if user denied remote notification.
NSLog(@"[MXKAccount][Push] refreshPushKitPusher: Disable PushKit pusher for %@ account (notifications are denied)", self.mxCredentials.userId);
[self enablePushKitPusher:NO success:nil failure:nil];
//NSLog(@"[MXKAccount][Push] refreshPushKitPusher: Disable PushKit pusher for %@ account (notifications are denied)", self.mxCredentials.userId);
//[self enablePushKitPusher:NO success:nil failure:nil];
}
}

Expand Down

0 comments on commit ec5b56c

Please sign in to comment.