disable muc push on archive instead of leave

leave can be triggered on swipe and doesn’t mean we don’t want pushes
This commit is contained in:
Daniel Gultsch 2019-07-01 14:34:55 +02:00
parent 5304ac60a7
commit 8c526de0af

View file

@ -2046,6 +2046,10 @@ public class XmppConnectionService extends Service {
} }
} }
} }
if (conversation.getMucOptions().push()) {
disableDirectMucPush(conversation);
mPushManagementService.disablePushOnServer(conversation);
}
leaveMuc(conversation); leaveMuc(conversation);
} else { } else {
if (conversation.getContact().getOption(Contact.Options.PENDING_SUBSCRIPTION_REQUEST)) { if (conversation.getContact().getOption(Contact.Options.PENDING_SUBSCRIPTION_REQUEST)) {
@ -2861,10 +2865,6 @@ public class XmppConnectionService extends Service {
account.pendingConferenceLeaves.remove(conversation); account.pendingConferenceLeaves.remove(conversation);
} }
if (account.getStatus() == Account.State.ONLINE || now) { if (account.getStatus() == Account.State.ONLINE || now) {
if (conversation.getMucOptions().push()) {
disableDirectMucPush(conversation);
mPushManagementService.disablePushOnServer(conversation);
}
sendPresencePacket(conversation.getAccount(), mPresenceGenerator.leave(conversation.getMucOptions())); sendPresencePacket(conversation.getAccount(), mPresenceGenerator.leave(conversation.getMucOptions()));
conversation.getMucOptions().setOffline(); conversation.getMucOptions().setOffline();
Bookmark bookmark = conversation.getBookmark(); Bookmark bookmark = conversation.getBookmark();