diff options
author | Marvin W <git@larma.de> | 2017-05-02 23:21:00 +0200 |
---|---|---|
committer | Marvin W <git@larma.de> | 2017-08-17 18:58:13 +0200 |
commit | e44cad1b9265e3cf0d0ad1a3ed202deafc470d14 (patch) | |
tree | cb423cbbd10d2939f2e1563fb67df4a856ac2b32 /libdino/src/service/message_processor.vala | |
parent | fbe198dd5cf545030f9b97e419f6a741f14444fe (diff) | |
download | dino-e44cad1b9265e3cf0d0ad1a3ed202deafc470d14.tar.gz dino-e44cad1b9265e3cf0d0ad1a3ed202deafc470d14.zip |
libdino: do not process message twice
Diffstat (limited to 'libdino/src/service/message_processor.vala')
-rw-r--r-- | libdino/src/service/message_processor.vala | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libdino/src/service/message_processor.vala b/libdino/src/service/message_processor.vala index 85b62a42..14d4ef28 100644 --- a/libdino/src/service/message_processor.vala +++ b/libdino/src/service/message_processor.vala @@ -65,8 +65,6 @@ public class MessageProcessor : StreamInteractionModule, Object { Entities.Message new_message = create_in_message(account, message); determine_message_type(account, message, new_message); - Conversation? conversation = stream_interactor.get_module(ConversationManager.IDENTITY).get_conversation_for_message(new_message); - if (conversation != null) process_message(new_message, message); } private Entities.Message create_in_message(Account account, Xmpp.Message.Stanza message) { @@ -131,6 +129,7 @@ public class MessageProcessor : StreamInteractionModule, Object { } else if (conversation.type_ == Conversation.Type.GROUPCHAT) { message.type_ = Entities.Message.Type.GROUPCHAT_PM; } + process_message(message, message_stanza); } else { Core.XmppStream stream = stream_interactor.get_stream(account); if (stream != null) stream.get_module(Xep.ServiceDiscovery.Module.IDENTITY).get_entity_categories(stream, message.counterpart.bare_jid.to_string(), (stream, identities) => { @@ -145,8 +144,8 @@ public class MessageProcessor : StreamInteractionModule, Object { } else { message.type_ = Entities.Message.Type.CHAT; } - process_message(message, message_stanza); } + process_message(message, message_stanza); }); } } |