aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2017-01-09 19:54:27 +0100
committerDaniel Gultsch <daniel@gultsch.de>2017-01-09 19:54:27 +0100
commit39bb8ad05f3469a81cf795cc75fd47475f967654 (patch)
treeeff00fef90dec93165a2f33e62a9f966fdf7e3e6 /src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
parentb09b8136d243ae945a09ff54b577564b7fa8e8e8 (diff)
automatically bookmark private, non-anonymous mucs where inviter is trusted. fixes #2035 #937
Diffstat (limited to '')
-rw-r--r--src/main/java/eu/siacs/conversations/services/XmppConnectionService.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
index 053cbde1..ce49b2b6 100644
--- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
@@ -2047,10 +2047,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);
@@ -2095,6 +2103,9 @@ public class XmppConnectionService extends Service {
}
if (mucOptions.membersOnly() && mucOptions.nonanonymous()) {
fetchConferenceMembers(conversation);
+ if (followedInvite && conversation.getBookmark() == null) {
+ saveConversationAsBookmark(conversation,null);
+ }
}
sendUnsentMessages(conversation);
}