mod_csi_simple: Consider MUC invites important
authorKim Alvefur <zash@zash.se>
Sat, 18 Apr 2020 19:36:26 +0200
changeset 10737 89e0f5cb60a1
parent 10736 f5d88ad24b30
child 10738 136c41a3d03c
mod_csi_simple: Consider MUC invites important Both mediated invites defined by XEP-0045: Multi-User Chat and direct invites defined by XEP-0249: Direct MUC Invitations
doc/doap.xml
plugins/mod_csi_simple.lua
--- a/doc/doap.xml	Mon Apr 20 18:33:05 2020 +0200
+++ b/doc/doap.xml	Sat Apr 18 19:36:26 2020 +0200
@@ -431,6 +431,14 @@
     </implements>
     <implements>
       <xmpp:SupportedXep>
+        <xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0249.html"/>
+        <xmpp:version>1.2</xmpp:version>
+        <xmpp:since>0.12</xmpp:since>
+        <xmpp:note>mod_csi_simple</xmpp:note>
+      </xmpp:SupportedXep>
+    </implements>
+    <implements>
+      <xmpp:SupportedXep>
         <xmpp:xep rdf:resource="https://xmpp.org/extensions/xep-0280.html"/>
         <xmpp:version>0.12.1</xmpp:version>
         <xmpp:status>complete</xmpp:status>
--- a/plugins/mod_csi_simple.lua	Mon Apr 20 18:33:05 2020 +0200
+++ b/plugins/mod_csi_simple.lua	Sat Apr 18 19:36:26 2020 +0200
@@ -48,6 +48,9 @@
 		if stanza:get_child("encryption", "urn:xmpp:eme:0") then
 			return true;
 		end
+		if stanza:get_child("x", "jabber:x:conference") or stanza:find("{http://jabber.org/protocol/muc#user}x/invite") then
+			return true;
+		end
 		for important in important_payloads do
 			if stanza:find(important) then
 				return true;