diff options
author | fiaxh <git@lightrise.org> | 2023-01-06 16:14:47 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2023-01-11 19:49:03 +0100 |
commit | cb3b19b01deb8460627578b885339e7528411f6f (patch) | |
tree | e879305f4f43b0f88c44aeef4c02fde3f101b1e9 /libdino/src/service/replies.vala | |
parent | 0c4aea96ffbc05d6efeb9a83424b872ce7f30d88 (diff) | |
download | dino-cb3b19b01deb8460627578b885339e7528411f6f.tar.gz dino-cb3b19b01deb8460627578b885339e7528411f6f.zip |
Support replies and reactions to files
Diffstat (limited to 'libdino/src/service/replies.vala')
-rw-r--r-- | libdino/src/service/replies.vala | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/libdino/src/service/replies.vala b/libdino/src/service/replies.vala index 6a9bced4..97db70ee 100644 --- a/libdino/src/service/replies.vala +++ b/libdino/src/service/replies.vala @@ -77,22 +77,7 @@ public class Dino.Replies : StreamInteractionModule, Object { Xep.Replies.ReplyTo? reply_to = Xep.Replies.get_reply_to(stanza); if (reply_to == null) return; - Message? quoted_message = null; - if (conversation.type_ == Conversation.Type.GROUPCHAT) { - quoted_message = stream_interactor.get_module(MessageStorage.IDENTITY).get_message_by_server_id(reply_to.to_message_id, conversation); - } else { - quoted_message = stream_interactor.get_module(MessageStorage.IDENTITY).get_message_by_stanza_id(reply_to.to_message_id, conversation); - } - if (quoted_message == null) { - db.reply.upsert() - .value(db.reply.message_id, message.id, true) - .value(db.reply.quoted_message_stanza_id, reply_to.to_message_id) - .value(db.reply.quoted_message_from, reply_to.to_jid.to_string()) - .perform(); - return; - } - - ContentItem? quoted_content_item = stream_interactor.get_module(ContentItemStore.IDENTITY).get_item_by_foreign(conversation, 1, quoted_message.id); + ContentItem? quoted_content_item = stream_interactor.get_module(ContentItemStore.IDENTITY).get_content_item_for_message_id(conversation, reply_to.to_message_id); if (quoted_content_item == null) return; set_message_is_reply_to(message, quoted_content_item); |