changeset 2460:3ed504b944e5

mod_csi_pump: Consider groupchat message with subject important
author Kim Alvefur <zash@zash.se>
date Mon, 23 Jan 2017 16:00:20 +0100
parents 8e686bf63441
children b50ed19e7f80
files mod_csi_pump/mod_csi_pump.lua
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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