aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/parser
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-11-22 21:58:38 +0100
committerChristian Schneppe <christian@pix-art.de>2017-11-22 21:58:38 +0100
commitf5a5fb2bd391877ff438e3a3b773df7eb822f02e (patch)
tree058a8d3fca8b2fbf57601b97b5333c8b1caa7324 /src/main/java/de/pixart/messenger/parser
parent38756a4b393085827cdfb514f6d2429a5aeb87a2 (diff)
save full jid when sending in muc. check chat markers against 'sender'
Diffstat (limited to 'src/main/java/de/pixart/messenger/parser')
-rw-r--r--src/main/java/de/pixart/messenger/parser/MessageParser.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/parser/MessageParser.java b/src/main/java/de/pixart/messenger/parser/MessageParser.java
index d5003dc11..f3be9651f 100644
--- a/src/main/java/de/pixart/messenger/parser/MessageParser.java
+++ b/src/main/java/de/pixart/messenger/parser/MessageParser.java
@@ -688,6 +688,7 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
Element displayed = packet.findChild("displayed", "urn:xmpp:chat-markers:0");
if (displayed != null) {
final String id = displayed.getAttribute("id");
+ final Jid sender = displayed.getAttributeAsJid("sender");
if (packet.fromAccount(account)) {
Conversation conversation = mXmppConnectionService.find(account, counterpart.toBareJid());
if (conversation != null && (query == null || query.isCatchup())) {
@@ -695,8 +696,8 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
}
} else if (isTypeGroupChat) {
Conversation conversation = mXmppConnectionService.find(account, counterpart.toBareJid());
- if (conversation != null && id != null) {
- Message message = conversation.findMessageWithRemoteId(id);
+ if (conversation != null && id != null && sender != null) {
+ Message message = conversation.findMessageWithRemoteId(id, sender);
if (message != null) {
if (conversation.getMucOptions().isSelf(counterpart)) {
if (!message.isRead() && (query == null || query.isCatchup())) { //checking if message is unread fixes race conditions with reflections