add nick to bookmark when entering full jid in join conference dialog
This commit is contained in:
parent
adca670196
commit
efab290c28
|
@ -458,16 +458,18 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
|
||||||
} else {
|
} else {
|
||||||
final Bookmark bookmark = new Bookmark(account,conferenceJid.toBareJid());
|
final Bookmark bookmark = new Bookmark(account,conferenceJid.toBareJid());
|
||||||
bookmark.setAutojoin(true);
|
bookmark.setAutojoin(true);
|
||||||
|
String nick = conferenceJid.getResourcepart();
|
||||||
|
if (nick != null && !nick.isEmpty()) {
|
||||||
|
bookmark.setNick(nick);
|
||||||
|
}
|
||||||
account.getBookmarks().add(bookmark);
|
account.getBookmarks().add(bookmark);
|
||||||
xmppConnectionService
|
xmppConnectionService.pushBookmarks(account);
|
||||||
.pushBookmarks(account);
|
|
||||||
final Conversation conversation = xmppConnectionService
|
final Conversation conversation = xmppConnectionService
|
||||||
.findOrCreateConversation(account,
|
.findOrCreateConversation(account,
|
||||||
conferenceJid, true);
|
conferenceJid, true);
|
||||||
conversation.setBookmark(bookmark);
|
conversation.setBookmark(bookmark);
|
||||||
if (!conversation.getMucOptions().online()) {
|
if (!conversation.getMucOptions().online()) {
|
||||||
xmppConnectionService
|
xmppConnectionService.joinMuc(conversation);
|
||||||
.joinMuc(conversation);
|
|
||||||
}
|
}
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
switchToConversation(conversation);
|
switchToConversation(conversation);
|
||||||
|
|
Loading…
Reference in a new issue