aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/entities/Message.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/eu/siacs/conversations/entities/Message.java')
-rw-r--r--src/main/java/eu/siacs/conversations/entities/Message.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Message.java b/src/main/java/eu/siacs/conversations/entities/Message.java
index 9ab1da96..1b38d349 100644
--- a/src/main/java/eu/siacs/conversations/entities/Message.java
+++ b/src/main/java/eu/siacs/conversations/entities/Message.java
@@ -5,10 +5,10 @@ import android.database.Cursor;
import java.net.MalformedURLException;
import java.net.URL;
-import java.util.Arrays;
import eu.siacs.conversations.Config;
import eu.siacs.conversations.crypto.axolotl.XmppAxolotlSession;
+import eu.siacs.conversations.utils.CryptoHelper;
import eu.siacs.conversations.utils.GeoHelper;
import eu.siacs.conversations.utils.MimeUtils;
import eu.siacs.conversations.utils.UIHelper;
@@ -396,7 +396,7 @@ public class Message extends AbstractEntity {
&& this.counterpart.equals(message.getCounterpart())
&& (body.equals(otherBody)
||(message.getEncryption() == Message.ENCRYPTION_PGP
- && message.getRemoteMsgId().matches("[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}"))) ;
+ && CryptoHelper.UUID_PATTERN.matcher(message.getRemoteMsgId()).matches()));
} else {
return this.remoteMsgId == null
&& this.counterpart.equals(message.getCounterpart())
@@ -550,7 +550,7 @@ public class Message extends AbstractEntity {
try {
counterpart = Jid.fromParts(conversation.getJid().getLocalpart(),
conversation.getJid().getDomainpart(),
- presences.asStringArray()[0]);
+ presences.toResourceArray()[0]);
return true;
} catch (InvalidJidException e) {
counterpart = null;