aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-10-19 23:20:00 +0200
committerDaniel Gultsch <daniel@gultsch.de>2015-10-19 23:20:00 +0200
commitefab290c28ba932839582954695172bfdda220b6 (patch)
treeb719f20ba52026ac46f9243aa019ec21506f1d55 /src/main
parentadca670196294e39473f6873cc571025225c5d08 (diff)
add nick to bookmark when entering full jid in join conference dialog
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java10
1 files 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 74621fc4..df04567f 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);