deal with user entering full jids in join conference dialog

This commit is contained in:
iNPUTmice 2015-01-21 16:18:38 +01:00
parent be9af442ef
commit 00c74503ab
2 changed files with 4 additions and 3 deletions

View file

@ -997,8 +997,10 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
conversation.setAccount(account);
if (muc) {
conversation.setMode(Conversation.MODE_MULTI);
conversation.setContactJid(jid);
} else {
conversation.setMode(Conversation.MODE_SINGLE);
conversation.setContactJid(jid.toBareJid());
}
conversation.setNextEncryption(-1);
conversation.addAll(0, databaseBackend.getMessages(conversation, Config.PAGE_SIZE));
@ -1015,7 +1017,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
conversation = new Conversation(conversationName, account, jid,
Conversation.MODE_MULTI);
} else {
conversation = new Conversation(conversationName, account, jid,
conversation = new Conversation(conversationName, account, jid.toBareJid(),
Conversation.MODE_SINGLE);
}
this.databaseBackend.createConversation(conversation);

View file

@ -448,8 +448,7 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
if (account.hasBookmarkFor(conferenceJid)) {
jid.setError(getString(R.string.bookmark_already_exists));
} else {
final Bookmark bookmark = new Bookmark(account,
conferenceJid);
final Bookmark bookmark = new Bookmark(account,conferenceJid.toBareJid());
bookmark.setAutojoin(true);
account.getBookmarks().add(bookmark);
xmppConnectionService