fixed more edge cases in muc message parser

This commit is contained in:
Daniel Gultsch 2015-06-02 12:21:35 +02:00
parent df86b0fc47
commit 8ac933be9f

View File

@ -266,14 +266,14 @@ public class MessageParser extends AbstractParser implements
Conversation conversation = mXmppConnectionService.findOrCreateConversation(account, counterpart.toBareJid(), isTypeGroupChat); Conversation conversation = mXmppConnectionService.findOrCreateConversation(account, counterpart.toBareJid(), isTypeGroupChat);
if (isTypeGroupChat) { if (isTypeGroupChat) {
if (counterpart.getResourcepart().equals(conversation.getMucOptions().getActualNick())) { if (counterpart.getResourcepart().equals(conversation.getMucOptions().getActualNick())) {
status = Message.STATUS_SEND; status = Message.STATUS_SEND_RECEIVED;
if (mXmppConnectionService.markMessage(conversation, remoteMsgId, Message.STATUS_SEND_RECEIVED)) { if (mXmppConnectionService.markMessage(conversation, remoteMsgId, status)) {
return; return;
} else { } else {
Message message = conversation.findSentMessageWithBody(body); Message message = conversation.findSentMessageWithBody(body);
if (message != null) { if (message != null) {
message.setRemoteMsgId(remoteMsgId); message.setRemoteMsgId(remoteMsgId);
mXmppConnectionService.markMessage(message, Message.STATUS_SEND_RECEIVED); mXmppConnectionService.markMessage(message, status);
return; return;
} }
} }