From da822ebae89ad3b010a58cdf3b812d26de4b2aa4 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Mon, 27 Oct 2014 11:00:03 +0100 Subject: check for links in pgp encrypted messages as well --- src/eu/siacs/conversations/entities/Message.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/eu/siacs/conversations/entities') diff --git a/src/eu/siacs/conversations/entities/Message.java b/src/eu/siacs/conversations/entities/Message.java index 79b9b5ba..a089dd64 100644 --- a/src/eu/siacs/conversations/entities/Message.java +++ b/src/eu/siacs/conversations/entities/Message.java @@ -7,7 +7,6 @@ import java.util.Arrays; import eu.siacs.conversations.Config; import android.content.ContentValues; import android.database.Cursor; -import android.util.Log; public class Message extends AbstractEntity { @@ -367,13 +366,13 @@ public class Message extends AbstractEntity { return prev.mergable(this); } } + + public boolean trusted() { + Contact contact = this.getContact(); + return (status > STATUS_RECEIVED || (contact != null && contact.trusted())); + } public boolean bodyContainsDownloadable() { - Contact contact = this.getContact(); - if (status <= STATUS_RECEIVED - && (contact == null || !contact.trusted())) { - return false; - } try { URL url = new URL(this.getBody()); if (!url.getProtocol().equalsIgnoreCase("http") -- cgit v1.2.3