diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-10-06 00:33:52 +0200 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-10-06 00:33:52 +0200 |
commit | b788b84c31bc53feb659e1af4dcaad98396c2de7 (patch) | |
tree | 700da6bfedd14b4d3ab622471f44917bb16e626c /src/eu/siacs/conversations/services | |
parent | 6b3097ee27ff256afc22b93efec45d84caa2f53d (diff) |
refactored muc bookmark to extend element. keep all elements the server or other clients added before
Diffstat (limited to 'src/eu/siacs/conversations/services')
-rw-r--r-- | src/eu/siacs/conversations/services/XmppConnectionService.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java index 557a625b..073bcdc5 100644 --- a/src/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/eu/siacs/conversations/services/XmppConnectionService.java @@ -748,7 +748,7 @@ public class XmppConnectionService extends Service { Element query = iqPacket.query("jabber:iq:private"); Element storage = query.addChild("storage", "storage:bookmarks"); for (Bookmark bookmark : account.getBookmarks()) { - storage.addChild(bookmark.toElement()); + storage.addChild(bookmark); } sendIqPacket(account, iqPacket, null); } @@ -1120,11 +1120,8 @@ public class XmppConnectionService extends Service { public void providePasswordForMuc(Conversation conversation, String password) { if (conversation.getMode() == Conversation.MODE_MULTI) { conversation.getMucOptions().setPassword(password); - if (conversation.getBookmark() != null - && conversation.getMucOptions().isPasswordChanged()) { - if (!conversation.getBookmark().autojoin()) { - conversation.getBookmark().setAutojoin(true); - } + if (conversation.getBookmark() != null) { + conversation.getBookmark().setAutojoin(true); pushBookmarks(conversation.getAccount()); } databaseBackend.updateConversation(conversation); |