aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service/conversation_manager.vala
diff options
context:
space:
mode:
Diffstat (limited to 'libdino/src/service/conversation_manager.vala')
-rw-r--r--libdino/src/service/conversation_manager.vala9
1 files changed, 9 insertions, 0 deletions
diff --git a/libdino/src/service/conversation_manager.vala b/libdino/src/service/conversation_manager.vala
index 0f827e26..471ec74a 100644
--- a/libdino/src/service/conversation_manager.vala
+++ b/libdino/src/service/conversation_manager.vala
@@ -74,6 +74,15 @@ public class ConversationManager : StreamInteractionModule, Object {
return null;
}
+ public Conversation? get_conversation_by_id(int id) {
+ foreach (HashMap<Jid, Conversation> hm in conversations.values) {
+ foreach (Conversation conversation in hm.values) {
+ if (conversation.id == id) return conversation;
+ }
+ }
+ return null;
+ }
+
public Gee.List<Conversation> get_active_conversations() {
Gee.List<Conversation> ret = new ArrayList<Conversation>(Conversation.equals_func);
foreach (Account account in conversations.keys) {