aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service/muc_manager.vala
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-04-04 15:47:00 +0200
committerfiaxh <git@mx.ax.lt>2017-04-04 15:57:35 +0200
commit75e51b5ed3b639b9cf7b16b0ddbee7e362c44ef1 (patch)
treef593528003a5f00268988255904dfc8a6752a779 /libdino/src/service/muc_manager.vala
parentea5d3e50c6fd63ae3a151c883f691e76b9cb1018 (diff)
downloaddino-75e51b5ed3b639b9cf7b16b0ddbee7e362c44ef1.tar.gz
dino-75e51b5ed3b639b9cf7b16b0ddbee7e362c44ef1.zip
MessageStorage/Processor, correctly resolve conversations (fixup 22adbd3)
Diffstat (limited to 'libdino/src/service/muc_manager.vala')
-rw-r--r--libdino/src/service/muc_manager.vala12
1 files changed, 5 insertions, 7 deletions
diff --git a/libdino/src/service/muc_manager.vala b/libdino/src/service/muc_manager.vala
index c5bfb8ba..f63a557c 100644
--- a/libdino/src/service/muc_manager.vala
+++ b/libdino/src/service/muc_manager.vala
@@ -24,7 +24,7 @@ public class MucManager : StreamInteractionModule, Object {
this.stream_interactor = stream_interactor;
stream_interactor.account_added.connect(on_account_added);
stream_interactor.stream_negotiated.connect(on_stream_negotiated);
- stream_interactor.get_module(MessageManager.IDENTITY).pre_message_received.connect(on_pre_message_received);
+ stream_interactor.get_module(MessageProcessor.IDENTITY).pre_message_received.connect(on_pre_message_received);
}
public void join(Account account, Jid jid, string nick, string? password = null) {
@@ -170,12 +170,10 @@ public class MucManager : StreamInteractionModule, Object {
}
string? muc_nick = stream.get_flag(Xep.Muc.Flag.IDENTITY).get_muc_nick(conversation.counterpart.bare_jid.to_string());
if (muc_nick != null && message.from.equals(new Jid(@"$(message.from.bare_jid)/$muc_nick"))) { // TODO better from own
- Gee.List<Entities.Message>? messages = stream_interactor.get_module(MessageManager.IDENTITY).get_messages(conversation);
- if (messages != null) { // TODO not here
- foreach (Entities.Message m in messages) {
- if (m.equals(message)) {
- m.marked = Entities.Message.Marked.RECEIVED;
- }
+ Gee.List<Entities.Message> messages = stream_interactor.get_module(MessageStorage.IDENTITY).get_messages(conversation);
+ foreach (Entities.Message m in messages) { // TODO not here
+ if (m.equals(message)) {
+ m.marked = Entities.Message.Marked.RECEIVED;
}
}
}