From efab290c28ba932839582954695172bfdda220b6 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Mon, 19 Oct 2015 23:20:00 +0200 Subject: [PATCH] add nick to bookmark when entering full jid in join conference dialog --- .../conversations/ui/StartConversationActivity.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java index 74621fc4c..df04567f1 100644 --- a/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java @@ -458,16 +458,18 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU } else { final Bookmark bookmark = new Bookmark(account,conferenceJid.toBareJid()); bookmark.setAutojoin(true); + String nick = conferenceJid.getResourcepart(); + if (nick != null && !nick.isEmpty()) { + bookmark.setNick(nick); + } account.getBookmarks().add(bookmark); - xmppConnectionService - .pushBookmarks(account); + xmppConnectionService.pushBookmarks(account); final Conversation conversation = xmppConnectionService .findOrCreateConversation(account, conferenceJid, true); conversation.setBookmark(bookmark); if (!conversation.getMucOptions().online()) { - xmppConnectionService - .joinMuc(conversation); + xmppConnectionService.joinMuc(conversation); } dialog.dismiss(); switchToConversation(conversation);