diff options
author | fiaxh <git@lightrise.org> | 2021-12-09 15:46:16 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2021-12-09 15:46:16 +0100 |
commit | fa1ba2f83dcbfbd009b61a6139be2233d729cb89 (patch) | |
tree | 459770198fc38bf2f1620cdfb316a4ba1dff5ff4 /plugins/http-files/src/file_sender.vala | |
parent | 905f93bcccd26a035cc9d37378b45ff87298adb5 (diff) | |
download | dino-fa1ba2f83dcbfbd009b61a6139be2233d729cb89.tar.gz dino-fa1ba2f83dcbfbd009b61a6139be2233d729cb89.zip |
Remove ContentFilters
fixes #1129 #573
Diffstat (limited to 'plugins/http-files/src/file_sender.vala')
-rw-r--r-- | plugins/http-files/src/file_sender.vala | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/plugins/http-files/src/file_sender.vala b/plugins/http-files/src/file_sender.vala index a038e70f..e005b8c5 100644 --- a/plugins/http-files/src/file_sender.vala +++ b/plugins/http-files/src/file_sender.vala @@ -42,19 +42,11 @@ public class HttpFileSender : FileSender, Object { yield upload(file_transfer, send_data, file_meta); - file_transfer.info = send_data.url_down; // store the message content temporarily so the message gets filtered out - Entities.Message message = stream_interactor.get_module(MessageProcessor.IDENTITY).create_out_message(send_data.url_down, conversation); - - message.encryption = send_data.encrypt_message ? conversation.encryption : Encryption.NONE; - stream_interactor.get_module(MessageProcessor.IDENTITY).send_message(message, conversation); - file_transfer.info = message.id.to_string(); - ContentItem? content_item = stream_interactor.get_module(ContentItemStore.IDENTITY).get_item(conversation, 1, message.id); - if (content_item != null) { - stream_interactor.get_module(ContentItemStore.IDENTITY).set_item_hide(content_item, true); - } + message.encryption = send_data.encrypt_message ? conversation.encryption : Encryption.NONE; + stream_interactor.get_module(MessageProcessor.IDENTITY).send_xmpp_message(message, conversation); } public async bool can_send(Conversation conversation, FileTransfer file_transfer) { @@ -126,7 +118,7 @@ public class HttpFileSender : FileSender, Object { } private void check_add_oob(Entities.Message message, Xmpp.MessageStanza message_stanza, Conversation conversation) { - if (message.encryption == Encryption.NONE && message_is_file(db, message) && message.body.has_prefix("http")) { + if (message.encryption == Encryption.NONE && message.body.has_prefix("http") && message_is_file(db, message)) { Xep.OutOfBandData.add_url_to_message(message_stanza, message_stanza.body); } } |