diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-07-28 22:58:37 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2016-07-28 22:58:37 +0200 |
commit | 0e96e0a796661aae1af133f24d010a4957f68af2 (patch) | |
tree | 07555ef3033750ee2f45ebb933898ef7eeeb7841 /src/main/java/eu/siacs/conversations/entities/Message.java | |
parent | c06aceaae9b77d8a1e161b97499f5b62bea55851 (diff) |
show identity type for device selection
Diffstat (limited to 'src/main/java/eu/siacs/conversations/entities/Message.java')
-rw-r--r-- | src/main/java/eu/siacs/conversations/entities/Message.java | 6 |
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; |