LMC: find replacedMessages based on bare JID (#3548)
This commit is contained in:
parent
6155938623
commit
af898b3bc4
|
@ -307,8 +307,10 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
|
||||||
synchronized (this.messages) {
|
synchronized (this.messages) {
|
||||||
for (int i = this.messages.size() - 1; i >= 0; --i) {
|
for (int i = this.messages.size() - 1; i >= 0; --i) {
|
||||||
final Message message = messages.get(i);
|
final Message message = messages.get(i);
|
||||||
if (counterpart.equals(message.getCounterpart())
|
final boolean counterpartMatch = mode == MODE_SINGLE ?
|
||||||
&& ((message.getStatus() == Message.STATUS_RECEIVED) == received)
|
counterpart.asBareJid().equals(message.getCounterpart().asBareJid()) :
|
||||||
|
counterpart.equals(message.getCounterpart());
|
||||||
|
if (counterpartMatch && ((message.getStatus() == Message.STATUS_RECEIVED) == received)
|
||||||
&& (carbon == message.isCarbon() || received)) {
|
&& (carbon == message.isCarbon() || received)) {
|
||||||
final boolean idMatch = id.equals(message.getRemoteMsgId()) || message.remoteMsgIdMatchInEdit(id);
|
final boolean idMatch = id.equals(message.getRemoteMsgId()) || message.remoteMsgIdMatchInEdit(id);
|
||||||
if (idMatch && !message.isFileOrImage() && !message.treatAsDownloadable()) {
|
if (idMatch && !message.isFileOrImage() && !message.treatAsDownloadable()) {
|
||||||
|
|
Loading…
Reference in a new issue