diff options
author | fiaxh <git@lightrise.org> | 2019-12-18 18:53:14 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2019-12-18 20:35:04 +0100 |
commit | c3532bdf3141bcf0cbf9e4ae7a926dcda4f132ef (patch) | |
tree | a6264c95b8cd05ea18abd4c811cdfed46f98d6af /xmpp-vala/src/module/xep/0045_muc | |
parent | 321c3529f3fedbd5eaa9cd619ee408fb683921ca (diff) | |
download | dino-c3532bdf3141bcf0cbf9e4ae7a926dcda4f132ef.tar.gz dino-c3532bdf3141bcf0cbf9e4ae7a926dcda4f132ef.zip |
Refactor MAM catchup. Fetch from latest to earliest message.
Diffstat (limited to 'xmpp-vala/src/module/xep/0045_muc')
-rw-r--r-- | xmpp-vala/src/module/xep/0045_muc/module.vala | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/xmpp-vala/src/module/xep/0045_muc/module.vala b/xmpp-vala/src/module/xep/0045_muc/module.vala index b30145ff..59d61f3d 100644 --- a/xmpp-vala/src/module/xep/0045_muc/module.vala +++ b/xmpp-vala/src/module/xep/0045_muc/module.vala @@ -487,16 +487,15 @@ public class ReceivedPipelineListener : StanzaListener<MessageStanza> { StanzaNode? invite_node = x_node.get_subnode("invite", NS_URI_USER); string? password = null; StanzaNode? password_node = x_node.get_subnode("password", NS_URI_USER); - if (password_node != null) - password = password_node.get_string_content(); + if (password_node != null) password = password_node.get_string_content(); if (invite_node != null) { string? from_jid = invite_node.get_attribute("from"); if (from_jid != null) { StanzaNode? reason_node = invite_node.get_subnode("reason", NS_URI_USER); string? reason = null; - if (reason_node != null) - reason = reason_node.get_string_content(); - outer.invite_received(stream, message.from, new Jid(from_jid), password, reason); + if (reason_node != null) reason = reason_node.get_string_content(); + bool is_mam_message = Xep.MessageArchiveManagement.MessageFlag.get_flag(message) != null; // TODO + if (!is_mam_message) outer.invite_received(stream, message.from, new Jid(from_jid), password, reason); return true; } } |