Changeset

3538:946902fa4088

mod_csi_muc_priorities: Undo early return to make following commit clearer
author Kim Alvefur <zash@zash.se>
date Mon, 01 Apr 2019 13:19:07 +0200
parents 3537:7d6fb9570395
children 3539:6d51f44bc725
files mod_csi_muc_priorities/mod_csi_muc_priorities.lua
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mod_csi_muc_priorities/mod_csi_muc_priorities.lua	Mon Apr 01 08:40:22 2019 +0200
+++ b/mod_csi_muc_priorities/mod_csi_muc_priorities.lua	Mon Apr 01 13:19:07 2019 +0200
@@ -21,10 +21,14 @@
 
 			-- Look for mention
 			local rooms = session.rooms_joined;
-			if not rooms then return; end
-
-			local room_nick = rooms[room_jid];
-			if room_nick and body:find(room_nick, 1, true) then return true; end
+			if rooms then
+				local room_nick = rooms[room_jid];
+				if room_nick then
+					if body:find(room_nick, 1, true) then
+						return true;
+					end
+				end
+			end
 		end
 	end
 end);