aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/entities/Conversation.java
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2018-05-11 19:49:27 +0200
committersteckbrief <steckbrief@chefmail.de>2018-05-11 19:49:27 +0200
commitbff97731deed4c599dcb6c3a2887c9f47165dd3f (patch)
tree1a1479be225fef127146f58d69f32a947c4d013e /src/main/java/de/thedevstack/conversationsplus/entities/Conversation.java
parent1d8c547b447d68daf079d9db2b1d792fc631e462 (diff)
introduces JidUtil for Jid creation, fixes duplication of childs while adding childs with xmlns and name
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/entities/Conversation.java')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/entities/Conversation.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/entities/Conversation.java b/src/main/java/de/thedevstack/conversationsplus/entities/Conversation.java
index 0cce63f4..19f21610 100644
--- a/src/main/java/de/thedevstack/conversationsplus/entities/Conversation.java
+++ b/src/main/java/de/thedevstack/conversationsplus/entities/Conversation.java
@@ -22,7 +22,6 @@ import java.util.NavigableSet;
import java.util.TreeSet;
import de.thedevstack.conversationsplus.dto.LoadAvatarFor;
-import de.thedevstack.conversationsplus.enums.MessageDirection;
import de.thedevstack.conversationsplus.enums.MessageStatus;
import de.thedevstack.conversationsplus.utils.MessageUtil;
import de.thedevstack.conversationsplus.Config;
@@ -30,6 +29,7 @@ import de.thedevstack.conversationsplus.crypto.axolotl.AxolotlService;
import de.thedevstack.conversationsplus.xmpp.chatstate.ChatState;
import de.thedevstack.conversationsplus.xmpp.jid.InvalidJidException;
import de.thedevstack.conversationsplus.xmpp.jid.Jid;
+import de.thedevstack.conversationsplus.xmpp.jid.JidUtil;
public class Conversation extends AbstractEntity implements Blockable, LoadAvatarFor {
public static final String TABLENAME = "conversations";
@@ -461,7 +461,7 @@ public class Conversation extends AbstractEntity implements Blockable, LoadAvata
public static Conversation fromCursor(Cursor cursor) {
Jid jid;
try {
- jid = Jid.fromString(cursor.getString(cursor.getColumnIndex(CONTACTJID)), true);
+ jid = JidUtil.fromString(cursor.getString(cursor.getColumnIndex(CONTACTJID)), true);
} catch (final InvalidJidException e) {
// Borked DB..
jid = null;
@@ -826,7 +826,7 @@ public class Conversation extends AbstractEntity implements Blockable, LoadAvata
JSONArray array = this.attributes.getJSONArray(key);
for (int i = 0; i < array.length(); ++i) {
try {
- list.add(Jid.fromString(array.getString(i)));
+ list.add(JidUtil.fromString(array.getString(i)));
} catch (InvalidJidException e) {
//ignored
}