From c3532bdf3141bcf0cbf9e4ae7a926dcda4f132ef Mon Sep 17 00:00:00 2001 From: fiaxh Date: Wed, 18 Dec 2019 18:53:14 +0100 Subject: Refactor MAM catchup. Fetch from latest to earliest message. --- xmpp-vala/src/module/xep/0045_muc/module.vala | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'xmpp-vala/src/module/xep/0045_muc') 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 { 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; } } -- cgit v1.2.3-70-g09d2