aboutsummaryrefslogtreecommitdiff
path: root/plugins/http-files/src/file_provider.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2021-12-09 15:46:16 +0100
committerfiaxh <git@lightrise.org>2021-12-09 15:46:16 +0100
commitfa1ba2f83dcbfbd009b61a6139be2233d729cb89 (patch)
tree459770198fc38bf2f1620cdfb316a4ba1dff5ff4 /plugins/http-files/src/file_provider.vala
parent905f93bcccd26a035cc9d37378b45ff87298adb5 (diff)
downloaddino-fa1ba2f83dcbfbd009b61a6139be2233d729cb89.tar.gz
dino-fa1ba2f83dcbfbd009b61a6139be2233d729cb89.zip
Remove ContentFilters
fixes #1129 #573
Diffstat (limited to 'plugins/http-files/src/file_provider.vala')
-rw-r--r--plugins/http-files/src/file_provider.vala13
1 files changed, 4 insertions, 9 deletions
diff --git a/plugins/http-files/src/file_provider.vala b/plugins/http-files/src/file_provider.vala
index cd7b25b7..e3382439 100644
--- a/plugins/http-files/src/file_provider.vala
+++ b/plugins/http-files/src/file_provider.vala
@@ -23,7 +23,7 @@ public class FileProvider : Dino.FileProvider, Object {
private class ReceivedMessageListener : MessageListener {
public string[] after_actions_const = new string[]{ "STORE" };
- public override string action_group { get { return ""; } }
+ public override string action_group { get { return "MESSAGE_REINTERPRETING"; } }
public override string[] after_actions { get { return after_actions_const; } }
private FileProvider outer;
@@ -39,19 +39,14 @@ public class FileProvider : Dino.FileProvider, Object {
bool normal_file = oob_url != null && oob_url == message.body && FileProvider.http_url_regex.match(message.body);
bool omemo_file = FileProvider.omemo_url_regex.match(message.body);
if (normal_file || omemo_file) {
- yield outer.on_file_message(message, conversation);
+ outer.on_file_message(message, conversation);
+ return true;
}
return false;
}
}
- private async void on_file_message(Entities.Message message, Conversation conversation) {
- // Hide message
- 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);
- }
-
+ private void on_file_message(Entities.Message message, Conversation conversation) {
var additional_info = message.id.to_string();
var receive_data = new HttpFileReceiveData();