mod_csi_pump: Consider groupchat message with subject important

Mon, 23 Jan 2017 16:00:20 +0100

author
Kim Alvefur <zash@zash.se>
date
Mon, 23 Jan 2017 16:00:20 +0100
changeset 2460
3ed504b944e5
parent 2459
8e686bf63441
child 2461
b50ed19e7f80

mod_csi_pump: Consider groupchat message with subject important

mod_csi_pump/mod_csi_pump.lua file | annotate | diff | comparison | revisions
--- a/mod_csi_pump/mod_csi_pump.lua	Sun Jan 22 04:47:06 2017 +0100
+++ b/mod_csi_pump/mod_csi_pump.lua	Mon Jan 23 16:00:20 2017 +0100
@@ -54,8 +54,9 @@
 			return false;
 		end
 		local body = stanza:get_child_text("body");
-		if not body then return false; end
 		if st_type == "groupchat" then
+			if stanza:get_child_text("subject") then return true; end
+			if not body then return false; end
 			if body:find(session.username, 1, true) then return true; end
 			local rooms = session.rooms_joined;
 			if not rooms then return false; end

mercurial