plugins/mod_csi_simple.lua
changeset 10805 2b97aac0ea3c
parent 10776 31e702c5f475
child 10810 24e2b571d29a
--- a/plugins/mod_csi_simple.lua	Tue May 05 22:21:39 2020 +0200
+++ b/plugins/mod_csi_simple.lua	Tue May 05 23:08:47 2020 +0200
@@ -28,18 +28,19 @@
 	local st_name = stanza.name;
 	if not st_name then return false; end
 	local st_type = stanza.attr.type;
-	if st_type == "error" then
-		return true;
-	end
 	if st_name == "presence" then
-		if st_type == nil or st_type == "unavailable" then
+		if st_type == nil or st_type == "unavailable" or st_name == "error" then
 			return false;
 		end
+		-- TODO Some MUC awareness, e.g. check for the 'this relates to you' status code
 		return true;
 	elseif st_name == "message" then
 		if st_type == "headline" then
 			return false;
 		end
+		if st_type == "error" then
+			return true;
+		end
 		if stanza:get_child("sent", "urn:xmpp:carbons:2") then
 			return true;
 		end