diff options
author | fiaxh <git@lightrise.org> | 2024-11-02 22:24:59 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2024-11-15 14:40:08 -0600 |
commit | 79f792e090330a05753f9edb27332a946eb0840d (patch) | |
tree | 5a6f1ad3ac0af0beea44ca9e83e7a9b052263025 /libdino/src/service/message_processor.vala | |
parent | aaf4542e6208460c305db4be36b15dc832ddc95a (diff) | |
download | dino-79f792e090330a05753f9edb27332a946eb0840d.tar.gz dino-79f792e090330a05753f9edb27332a946eb0840d.zip |
Fix and improve stateless file-sharing
Diffstat (limited to 'libdino/src/service/message_processor.vala')
-rw-r--r-- | libdino/src/service/message_processor.vala | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libdino/src/service/message_processor.vala b/libdino/src/service/message_processor.vala index d8ea3e2d..e8a43b05 100644 --- a/libdino/src/service/message_processor.vala +++ b/libdino/src/service/message_processor.vala @@ -307,7 +307,8 @@ public class MessageProcessor : StreamInteractionModule, Object { public override string[] after_actions { get { return after_actions_const; } } public override async bool run(Entities.Message message, Xmpp.MessageStanza stanza, Conversation conversation) { - return (message.body == null); + return message.body == null && + Xep.StatelessFileSharing.get_file_shares(stanza) == null; } } @@ -326,8 +327,6 @@ public class MessageProcessor : StreamInteractionModule, Object { } public override async bool run(Entities.Message message, Xmpp.MessageStanza stanza, Conversation conversation) { - if (message.body == null || outer.is_duplicate(message, stanza, conversation)) return true; - stream_interactor.get_module(MessageStorage.IDENTITY).add_message(message, conversation); return false; } @@ -371,7 +370,7 @@ public class MessageProcessor : StreamInteractionModule, Object { } } - public Entities.Message create_out_message(string text, Conversation conversation) { + public Entities.Message create_out_message(string? text, Conversation conversation) { Entities.Message message = new Entities.Message(text); message.type_ = Util.get_message_type_for_conversation(conversation); message.stanza_id = random_uuid(); |