diff options
author | eerielili <lionel@les-miquelots.net> | 2024-08-25 13:32:38 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-25 13:32:38 +0000 |
commit | 45755727db79a2935376d24e7bde7eadb0f2f7ca (patch) | |
tree | 73715da99c9d980079df6f2d561822364655e04d /libdino/src/service/replies.vala | |
parent | 62cdea3a5e701c04f3a7fd9d6b5f48e28fef1f72 (diff) | |
parent | 51252f74c94c17d56aa75534652bdc5d43a504cb (diff) | |
download | dino-45755727db79a2935376d24e7bde7eadb0f2f7ca.tar.gz dino-45755727db79a2935376d24e7bde7eadb0f2f7ca.zip |
Merge branch 'master' into add-yourselfadd-yourself
Diffstat (limited to 'libdino/src/service/replies.vala')
-rw-r--r-- | libdino/src/service/replies.vala | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/libdino/src/service/replies.vala b/libdino/src/service/replies.vala index 58d44b37..cc9f43cc 100644 --- a/libdino/src/service/replies.vala +++ b/libdino/src/service/replies.vala @@ -38,17 +38,6 @@ public class Dino.Replies : StreamInteractionModule, Object { return null; } - public void set_message_is_reply_to(Message message, ContentItem reply_to) { - message.quoted_item_id = reply_to.id; - - db.reply.upsert() - .value(db.reply.message_id, message.id, true) - .value(db.reply.quoted_content_item_id, reply_to.id) - .value_null(db.reply.quoted_message_stanza_id) - .value_null(db.reply.quoted_message_from) - .perform(); - } - private void on_incoming_message(Entities.Message message, Xmpp.MessageStanza stanza, Conversation conversation) { // Check if a previous message was in reply to this one var reply_qry = db.reply.select(); @@ -67,7 +56,7 @@ public class Dino.Replies : StreamInteractionModule, Object { ContentItem? message_item = stream_interactor.get_module(ContentItemStore.IDENTITY).get_item_by_foreign(conversation, 1, message.id); Message? reply_message = stream_interactor.get_module(MessageStorage.IDENTITY).get_message_by_id(reply_row[db.message.id], conversation); if (message_item != null && reply_message != null) { - set_message_is_reply_to(reply_message, message_item); + reply_message.set_quoted_item(message_item.id); } } @@ -78,7 +67,7 @@ public class Dino.Replies : StreamInteractionModule, Object { 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); + message.set_quoted_item(quoted_content_item.id); } private class ReceivedMessageListener : MessageListener { |