revert commit that attempted to do bare jid matching for LMC

That commit never worked because there were other checks in place later down the stream.

Allowing other clients (resources) to correct messages introduces the potential for nasty race conditions.
Furthermore we also have a check in place that would check that the OMEMO fingerprint is the same for security reasons. Removing that check is currently undesirable. Therefor correcting a message from another client would only work for plain text messages (and maybe PGP); this only adds confusion for users for very little benefit.
This commit is contained in:
Daniel Gultsch 2020-05-01 07:44:57 +02:00
parent ea1c2f27d1
commit 86b2631449
1 changed files with 1 additions and 4 deletions

View File

@ -338,10 +338,7 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
if (mcp == null) {
continue;
}
final boolean counterpartMatch = mode == MODE_SINGLE ?
counterpart.asBareJid().equals(mcp.asBareJid()) :
counterpart.equals(mcp);
if (counterpartMatch && ((message.getStatus() == Message.STATUS_RECEIVED) == received)
if (mcp.equals(counterpart) && ((message.getStatus() == Message.STATUS_RECEIVED) == received)
&& (carbon == message.isCarbon() || received)) {
final boolean idMatch = id.equals(message.getRemoteMsgId()) || message.remoteMsgIdMatchInEdit(id);
if (idMatch && !message.isFileOrImage() && !message.treatAsDownloadable()) {