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") Timber.i("onNewEndpoint: adding $endpoint")
if (vectorPreferences.areNotificationEnabledForDevice() && activeSessionHolder.hasActiveSession()) { if (vectorPreferences.areNotificationEnabledForDevice() && activeSessionHolder.hasActiveSession()) {
val gateway = UPHelper.customOrDefaultGateway(context, endpoint) val gateway = UPHelper.customOrDefaultGateway(context, endpoint)
if (UPHelper.getUpEndpoint(context) != endpoint || if (UPHelper.getUpEndpoint(context) != endpoint
UPHelper.getPushGateway(context) != gateway) { || UPHelper.getPushGateway(context) != gateway) {
UPHelper.storePushGateway(context, gateway) UPHelper.storePushGateway(context, gateway)
UPHelper.storeUpEndpoint(context, endpoint) UPHelper.storeUpEndpoint(context, endpoint)
pusherManager.registerPusher(context, endpoint, gateway) pusherManager.registerPusher(context, endpoint, gateway)