diff options
Diffstat (limited to 'libdino/src/service/message_storage.vala')
-rw-r--r-- | libdino/src/service/message_storage.vala | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libdino/src/service/message_storage.vala b/libdino/src/service/message_storage.vala index 50fc94b3..4dbc05a7 100644 --- a/libdino/src/service/message_storage.vala +++ b/libdino/src/service/message_storage.vala @@ -100,6 +100,14 @@ public class MessageStorage : StreamInteractionModule, Object { return null; } + public Message? get_message_by_server_id(string server_id, Conversation conversation) { + init_conversation(conversation); + foreach (Message message in messages[conversation]) { + if (message.server_id == server_id) return message; + } + return null; + } + public Conversation? get_conversation_for_stanza_id(Account account, string stanza_id) { foreach (Conversation conversation in messages.keys) { if (!conversation.account.equals(account)) continue; |