aboutsummaryrefslogtreecommitdiffstats
path: root/src/de/gultsch/chat/ui
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/de/gultsch/chat/ui/NewConversationActivity.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/de/gultsch/chat/ui/NewConversationActivity.java b/src/de/gultsch/chat/ui/NewConversationActivity.java
index a41e3e39..ac178fad 100644
--- a/src/de/gultsch/chat/ui/NewConversationActivity.java
+++ b/src/de/gultsch/chat/ui/NewConversationActivity.java
@@ -79,6 +79,7 @@ public class NewConversationActivity extends XmppActivity {
if (Validator.isValidJid(searchString)) {
String name = searchString.split("@")[0];
Contact newContact = new Contact(null, name, searchString, null);
+ newContact.flagAsNotInRoster();
aggregatedContacts.add(newContact);
contactsHeader.setText("Create new contact");
} else {
@@ -228,7 +229,9 @@ public class NewConversationActivity extends XmppActivity {
}
public void startConversation(Contact contact, Account account, boolean muc) {
- Log.d("xmppService","starting conversation for account:"+account.getJid()+" and contact:"+contact.getJid());
+ if (!contact.isInRoster()) {
+ xmppConnectionService.createContact(contact);
+ }
Conversation conversation = xmppConnectionService
.findOrCreateConversation(account, contact.getJid(), muc);