This commit is contained in:
S1m 2021-07-13 08:29:05 +02:00
parent dbfa5e1fd5
commit ff0c98e8fa

View file

@ -158,8 +158,8 @@ val upHandler = object: MessagingReceiverHandler {
Timber.i("onNewEndpoint: adding $endpoint")
if (vectorPreferences.areNotificationEnabledForDevice() && activeSessionHolder.hasActiveSession()) {
val gateway = UPHelper.customOrDefaultGateway(context, endpoint)
if (UPHelper.getUpEndpoint(context) != endpoint ||
UPHelper.getPushGateway(context) != gateway) {
if (UPHelper.getUpEndpoint(context) != endpoint
|| UPHelper.getPushGateway(context) != gateway) {
UPHelper.storePushGateway(context, gateway)
UPHelper.storeUpEndpoint(context, endpoint)
pusherManager.registerPusher(context, endpoint, gateway)