From 7aed735df28984e76486f23d17d02981b268930e Mon Sep 17 00:00:00 2001 From: steckbrief Date: Fri, 23 Oct 2015 22:20:54 +0200 Subject: Fixes FS#47: WiFi only setting in unencrypted chats bug fixed, typo in values for the setting fixed, preferences involved in the decision for auto downloading image links moved to global Utility Class --- .../de/thedevstack/conversationsplus/parser/MessageParser.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/main/java/de/thedevstack/conversationsplus/parser/MessageParser.java') diff --git a/src/main/java/de/thedevstack/conversationsplus/parser/MessageParser.java b/src/main/java/de/thedevstack/conversationsplus/parser/MessageParser.java index 2969a18d..aa04df2b 100644 --- a/src/main/java/de/thedevstack/conversationsplus/parser/MessageParser.java +++ b/src/main/java/de/thedevstack/conversationsplus/parser/MessageParser.java @@ -23,6 +23,7 @@ import de.thedevstack.conversationsplus.xmpp.chatstate.ChatState; import de.thedevstack.conversationsplus.xmpp.jid.Jid; import de.thedevstack.conversationsplus.xmpp.pep.Avatar; import de.thedevstack.conversationsplus.xmpp.stanzas.MessagePacket; +import de.tzur.conversations.Settings; public class MessageParser extends AbstractParser implements OnMessagePacketReceived { @@ -368,7 +369,11 @@ public class MessageParser extends AbstractParser implements mXmppConnectionService.databaseBackend.createMessage(message); } final HttpConnectionManager manager = this.mXmppConnectionService.getHttpConnectionManager(); - if (message.trusted() && message.treatAsDownloadable() != Message.Decision.NEVER && manager.getAutoAcceptFileSize() > 0) { + if (message.trusted() + && message.treatAsDownloadable() != Message.Decision.NEVER + && ConversationsPlusPreferences.autoAcceptFileSize() > 0 + && ConversationsPlusPreferences.autoDownloadFileLink() + && mXmppConnectionService.isDownloadAllowedInConnection()) { manager.createNewDownloadConnection(message); } else if (!message.isRead()) { mXmppConnectionService.getNotificationService().push(message); -- cgit v1.2.3