From 135e9c9bdc66a58781211f45e1cb0517ad675d20 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Mon, 9 Jan 2017 22:21:40 +0100 Subject: automatically bookmark private, non-anonymous mucs where inviter is trusted --- .../de/pixart/messenger/services/XmppConnectionService.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/main/java/de/pixart/messenger/services') diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java index 5a76d3f88..a1fbf5314 100644 --- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java +++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java @@ -2230,10 +2230,18 @@ public class XmppConnectionService extends Service { } public void joinMuc(Conversation conversation) { - joinMuc(conversation, null); + joinMuc(conversation, null, false); + } + + public void joinMuc(Conversation conversation, boolean followedInvite) { + joinMuc(conversation, null, followedInvite); } private void joinMuc(Conversation conversation, final OnConferenceJoined onConferenceJoined) { + joinMuc(conversation, onConferenceJoined, false); + } + + private void joinMuc(Conversation conversation, final OnConferenceJoined onConferenceJoined, final boolean followedInvite) { Account account = conversation.getAccount(); account.pendingConferenceJoins.remove(conversation); account.pendingConferenceLeaves.remove(conversation); @@ -2278,6 +2286,9 @@ public class XmppConnectionService extends Service { } if (mucOptions.membersOnly() && mucOptions.nonanonymous()) { fetchConferenceMembers(conversation); + if (followedInvite && conversation.getBookmark() == null) { + saveConversationAsBookmark(conversation, null); + } } sendUnsentMessages(conversation); } -- cgit v1.2.3