From 8c526de0af50a897ef2510c7c974214d61428ec6 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Mon, 1 Jul 2019 14:34:55 +0200 Subject: [PATCH] disable muc push on archive instead of leave MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit leave can be triggered on swipe and doesn’t mean we don’t want pushes --- .../conversations/services/XmppConnectionService.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index a0d111e73..10ba7c9e8 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -2046,6 +2046,10 @@ public class XmppConnectionService extends Service { } } } + if (conversation.getMucOptions().push()) { + disableDirectMucPush(conversation); + mPushManagementService.disablePushOnServer(conversation); + } leaveMuc(conversation); } else { if (conversation.getContact().getOption(Contact.Options.PENDING_SUBSCRIPTION_REQUEST)) { @@ -2861,10 +2865,6 @@ public class XmppConnectionService extends Service { account.pendingConferenceLeaves.remove(conversation); } if (account.getStatus() == Account.State.ONLINE || now) { - if (conversation.getMucOptions().push()) { - disableDirectMucPush(conversation); - mPushManagementService.disablePushOnServer(conversation); - } sendPresencePacket(conversation.getAccount(), mPresenceGenerator.leave(conversation.getMucOptions())); conversation.getMucOptions().setOffline(); Bookmark bookmark = conversation.getBookmark();