aboutsummaryrefslogtreecommitdiffstats
path: root/src/de/gultsch/chat/ui/NewConversationActivity.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-02-23 21:33:37 +0100
committerDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-02-23 21:33:37 +0100
commitbfee69b00b2762a910f7f3f1714d18fddc99a9ad (patch)
tree56b370ae05bff9174ceeb4c7423d90c2d5bb8406 /src/de/gultsch/chat/ui/NewConversationActivity.java
parent4bffb4d94db6d32d8e98b8241402cb5e51a879e7 (diff)
add contact to roster if a new conversation is created
Diffstat (limited to 'src/de/gultsch/chat/ui/NewConversationActivity.java')
-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);