double check that muc message is ours if true jid is known

This commit is contained in:
Daniel Gultsch 2019-03-02 08:36:36 +01:00
parent a29a5fd491
commit f406631512

View file

@ -503,8 +503,13 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece
} else {
trueCounterpart = fallback;
}
if (trueCounterpart != null && trueCounterpart.asBareJid().equals(account.getJid().asBareJid())) {
status = isTypeGroupChat ? Message.STATUS_SEND_RECEIVED : Message.STATUS_SEND;
if (trueCounterpart != null) {
if (trueCounterpart.asBareJid().equals(account.getJid().asBareJid())) {
status = isTypeGroupChat ? Message.STATUS_SEND_RECEIVED : Message.STATUS_SEND;
} else {
status = Message.STATUS_RECEIVED;
message.setCarbon(false);
}
}
message.setStatus(status);
message.setTrueCounterpart(trueCounterpart);