aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service/message_storage.vala
diff options
context:
space:
mode:
Diffstat (limited to 'libdino/src/service/message_storage.vala')
-rw-r--r--libdino/src/service/message_storage.vala10
1 files changed, 9 insertions, 1 deletions
diff --git a/libdino/src/service/message_storage.vala b/libdino/src/service/message_storage.vala
index abc8acb4..9fb6ab19 100644
--- a/libdino/src/service/message_storage.vala
+++ b/libdino/src/service/message_storage.vala
@@ -76,7 +76,15 @@ public class MessageStorage : StreamInteractionModule, Object {
return db_messages;
}
- public Message? get_message_by_id(string stanza_id, Conversation conversation) {
+ public Message? get_message_by_id(int id, Conversation conversation) {
+ init_conversation(conversation);
+ foreach (Message message in messages[conversation]) {
+ if (message.id == id) return message;
+ }
+ return null;
+ }
+
+ public Message? get_message_by_stanza_id(string stanza_id, Conversation conversation) {
init_conversation(conversation);
foreach (Message message in messages[conversation]) {
if (message.stanza_id == stanza_id) return message;