diff options
author | fiaxh <git@mx.ax.lt> | 2017-04-04 15:47:00 +0200 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-04-04 15:57:35 +0200 |
commit | 75e51b5ed3b639b9cf7b16b0ddbee7e362c44ef1 (patch) | |
tree | f593528003a5f00268988255904dfc8a6752a779 /libdino/src/service/conversation_manager.vala | |
parent | ea5d3e50c6fd63ae3a151c883f691e76b9cb1018 (diff) | |
download | dino-75e51b5ed3b639b9cf7b16b0ddbee7e362c44ef1.tar.gz dino-75e51b5ed3b639b9cf7b16b0ddbee7e362c44ef1.zip |
MessageStorage/Processor, correctly resolve conversations (fixup 22adbd3)
Diffstat (limited to 'libdino/src/service/conversation_manager.vala')
-rw-r--r-- | libdino/src/service/conversation_manager.vala | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libdino/src/service/conversation_manager.vala b/libdino/src/service/conversation_manager.vala index ff4717ee..db9cff91 100644 --- a/libdino/src/service/conversation_manager.vala +++ b/libdino/src/service/conversation_manager.vala @@ -27,8 +27,8 @@ public class ConversationManager : StreamInteractionModule, Object { stream_interactor.add_module(this); stream_interactor.account_added.connect(on_account_added); stream_interactor.get_module(MucManager.IDENTITY).groupchat_joined.connect(on_groupchat_joined); - stream_interactor.get_module(MessageManager.IDENTITY).pre_message_received.connect(on_message_received); - stream_interactor.get_module(MessageManager.IDENTITY).message_sent.connect(on_message_sent); + stream_interactor.get_module(MessageProcessor.IDENTITY).pre_message_received.connect(on_message_received); + stream_interactor.get_module(MessageProcessor.IDENTITY).message_sent.connect(on_message_sent); } public Conversation create_conversation(Jid jid, Account account, Conversation.Type? type = null) { @@ -55,10 +55,14 @@ public class ConversationManager : StreamInteractionModule, Object { } public Gee.List<Conversation> get_conversations_for_presence(Show show, Account account) { + return get_conversations(show.jid, account); + } + + public Gee.List<Conversation> get_conversations(Jid jid, Account account) { Gee.List<Conversation> ret = new ArrayList<Conversation>(Conversation.equals_func); - Conversation? bare_conversation = get_conversation(show.jid, account); + Conversation? bare_conversation = get_conversation(jid, account); if (bare_conversation != null) ret.add(bare_conversation); - Conversation? full_conversation = get_conversation(show.jid.bare_jid, account); + Conversation? full_conversation = get_conversation(jid.bare_jid, account); if (full_conversation != null) ret.add(full_conversation); return ret; } |