diff options
Diffstat (limited to 'src/main/java/eu/siacs/conversations/entities')
-rw-r--r-- | src/main/java/eu/siacs/conversations/entities/Conversation.java | 10 | ||||
-rw-r--r-- | src/main/java/eu/siacs/conversations/entities/Message.java | 17 |
2 files changed, 5 insertions, 22 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Conversation.java b/src/main/java/eu/siacs/conversations/entities/Conversation.java index fdffeccb..c8dedd7b 100644 --- a/src/main/java/eu/siacs/conversations/entities/Conversation.java +++ b/src/main/java/eu/siacs/conversations/entities/Conversation.java @@ -55,7 +55,7 @@ public class Conversation extends AbstractEntity { private JSONObject attributes = new JSONObject(); - private String nextPresence; + private Jid nextCounterpart; protected ArrayList<Message> messages = new ArrayList<>(); protected Account account = null; @@ -345,12 +345,12 @@ public class Conversation extends AbstractEntity { this.contactJid = jid; } - public void setNextPresence(String presence) { - this.nextPresence = presence; + public void setNextCounterpart(Jid jid) { + this.nextCounterpart = jid; } - public String getNextPresence() { - return this.nextPresence; + public Jid getNextCounterpart() { + return this.nextCounterpart; } public int getLatestEncryption() { diff --git a/src/main/java/eu/siacs/conversations/entities/Message.java b/src/main/java/eu/siacs/conversations/entities/Message.java index f15b7527..550474bb 100644 --- a/src/main/java/eu/siacs/conversations/entities/Message.java +++ b/src/main/java/eu/siacs/conversations/entities/Message.java @@ -232,27 +232,10 @@ public class Message extends AbstractEntity { return this.type; } - public void setPresence(String presence) { - if (presence == null) { - this.counterpart = this.counterpart.toBareJid(); - } else { - try { - this.counterpart = Jid.fromString(this.counterpart.toBareJid() + "/" + presence); - } catch (final InvalidJidException ignored) { - // TODO: Handle this? - } - } - } - public void setTrueCounterpart(String trueCounterpart) { this.trueCounterpart = trueCounterpart; } - public Jid getPresence() { - // TODO: This is now the same as getCounterpart()... find usages in code and remove one? - return counterpart; - } - public void setDownloadable(Downloadable downloadable) { this.downloadable = downloadable; } |