aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/parser/MessageParser.java
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-11-09 16:21:13 +0100
committeriNPUTmice <daniel@gultsch.de>2014-11-09 16:21:13 +0100
commit377bd49ee807b9a06089ad5612ca15b9b00f2e36 (patch)
tree225e53c77c11377b4e64d65b5f33cf9c0c0858e6 /src/main/java/eu/siacs/conversations/parser/MessageParser.java
parent2b99b694eb25ed6ea82563d8a352be774ecc88d2 (diff)
refactored code to always contain full jid for counterpart
Diffstat (limited to 'src/main/java/eu/siacs/conversations/parser/MessageParser.java')
-rw-r--r--src/main/java/eu/siacs/conversations/parser/MessageParser.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
index 9796814bb..70d5b12b8 100644
--- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java
+++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
@@ -42,7 +42,7 @@ public class MessageParser extends AbstractParser implements
if (conversation.getMode() == Conversation.MODE_MULTI
&& !jid.getResourcepart().isEmpty()) {
finishedMessage.setType(Message.TYPE_PRIVATE);
- finishedMessage.setPresence(jid.getResourcepart());
+ finishedMessage.setCounterpart(packet.getFrom());
finishedMessage.setTrueCounterpart(conversation.getMucOptions()
.getTrueCounterpart(jid.getResourcepart()));
if (conversation.hasDuplicateMessage(finishedMessage)) {
@@ -249,7 +249,7 @@ public class MessageParser extends AbstractParser implements
if (conversation.getMode() == Conversation.MODE_MULTI
&& !fullJid.isBareJid()) {
finishedMessage.setType(Message.TYPE_PRIVATE);
- finishedMessage.setPresence(fullJid.getResourcepart());
+ finishedMessage.setCounterpart(fullJid);
finishedMessage.setTrueCounterpart(conversation.getMucOptions()
.getTrueCounterpart(fullJid.getResourcepart()));
if (conversation.hasDuplicateMessage(finishedMessage)) {
@@ -478,7 +478,7 @@ public class MessageParser extends AbstractParser implements
if (message.getStatus() == Message.STATUS_RECEIVED
&& conversation.getOtrSession() != null
&& !conversation.getOtrSession().getSessionID().getUserID()
- .equals(message.getPresence())) {
+ .equals(message.getCounterpart().getResourcepart())) {
conversation.endOtrIfNeeded();
}