diff options
author | Christian Schneppe <christian@pix-art.de> | 2016-11-11 22:56:28 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-11-11 22:56:28 +0100 |
commit | 945cea7ce5d7102d35c255e2f09d27ac14fb1620 (patch) | |
tree | e31b780be8be5c0035bb6dc9e067885cb60c9491 /src/main/java/de/pixart/messenger/entities | |
parent | acf3c1f5685b22e6ba404760b09d08de8dea5dd8 (diff) |
show button on "xmpp:" uris
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/pixart/messenger/entities/Message.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Message.java b/src/main/java/de/pixart/messenger/entities/Message.java index 7bd61c5b9..e3dc68ce9 100644 --- a/src/main/java/de/pixart/messenger/entities/Message.java +++ b/src/main/java/de/pixart/messenger/entities/Message.java @@ -13,6 +13,7 @@ import de.pixart.messenger.utils.CryptoHelper; import de.pixart.messenger.utils.GeoHelper; import de.pixart.messenger.utils.MimeUtils; import de.pixart.messenger.utils.UIHelper; +import de.pixart.messenger.utils.XmppUri; import de.pixart.messenger.xmpp.jid.InvalidJidException; import de.pixart.messenger.xmpp.jid.Jid; @@ -492,6 +493,8 @@ public class Message extends AbstractEntity { !this.getBody().startsWith(ME_COMMAND) && !this.bodyIsHeart() && !message.bodyIsHeart() && + !this.bodyIsXmpp() && + !message.bodyIsXmpp() && this.isTrusted() == message.isTrusted() ); } @@ -680,6 +683,10 @@ public class Message extends AbstractEntity { return body != null && UIHelper.HEARTS.contains(body.trim()); } + public boolean bodyIsXmpp() { + return body != null && XmppUri.isXmppUri(body.trim()); + } + public FileParams getFileParams() { FileParams params = getLegacyFileParams(); if (params != null) { |