aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/services/XmppConnectionService.java
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-07-14 17:13:59 +0200
committeriNPUTmice <daniel@gultsch.de>2014-07-14 17:13:59 +0200
commit6031af86062757f86701e08962aa86121877fbf4 (patch)
tree9bb335d4e5f92493ddb16f80ae01f577aa4b991f /src/eu/siacs/conversations/services/XmppConnectionService.java
parent3fa3d5f02ba954d87179c64cd75bd2ae7a749770 (diff)
use proper picture on bookmarked conferences when joined. use bookmark title when no subject is set
Diffstat (limited to 'src/eu/siacs/conversations/services/XmppConnectionService.java')
-rw-r--r--src/eu/siacs/conversations/services/XmppConnectionService.java14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java
index 3fa263ab3..aa62b8a1a 100644
--- a/src/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/eu/siacs/conversations/services/XmppConnectionService.java
@@ -684,14 +684,11 @@ public class XmppConnectionService extends Service {
Log.d(LOGTAG,item.toString());
Bookmark bookmark = Bookmark.parse(item,account);
bookmarks.add(bookmark);
- if (bookmark.autojoin()) {
- Log.d(LOGTAG,"has autojoin");
- Conversation conversation = findMuc(bookmark);
- if (conversation!=null) {
- Log.d(LOGTAG,"conversation existed. adding bookmark");
- conversation.setBookmark(bookmark);
- } else {
- Log.d(LOGTAG,"creating new conversation");
+ Conversation conversation = findMuc(bookmark);
+ if (conversation!=null) {
+ conversation.setBookmark(bookmark);
+ } else {
+ if (bookmark.autojoin()) {
conversation = findOrCreateConversation(account, bookmark.getJid(), true);
conversation.setBookmark(bookmark);
}
@@ -1011,6 +1008,7 @@ public class XmppConnectionService extends Service {
Log.d(LOGTAG, "send leaving muc " + packet);
sendPresencePacket(conversation.getAccount(),packet);
conversation.getMucOptions().setOffline();
+ conversation.deregisterWithBookmark();
}
public void disconnect(Account account, boolean force) {