Diff

mod_csi_muc_priorities/mod_csi_muc_priorities.lua @ 3533:d8c4543f1b19

mod_csi_muc_priorities: Remove dependency on mod_track_muc_joins Load it manually to enable mention support.
author Kim Alvefur <zash@zash.se>
date Mon, 01 Apr 2019 08:07:41 +0200
parent 3532:85c357b69eec
child 3534:700340b57851
line wrap: on
line diff
--- a/mod_csi_muc_priorities/mod_csi_muc_priorities.lua	Mon Apr 01 00:15:13 2019 +0200
+++ b/mod_csi_muc_priorities/mod_csi_muc_priorities.lua	Mon Apr 01 08:07:41 2019 +0200
@@ -1,7 +1,5 @@
 local jid = require "util.jid";
 
-module:depends"track_muc_joins"
-
 module:hook("csi-is-stanza-important", function (event)
 	local stanza, session = event.stanza, event.session;
 	if stanza.name == "message" then
@@ -10,9 +8,8 @@
 			if not body then return end
 
 			local rooms = session.rooms_joined;
-			if not rooms then return false; end
+			if not rooms then return; end
 
-			-- TODO optional?
 			local room_nick = rooms[jid.bare(stanza.attr.from)];
 			if room_nick and body:find(room_nick, 1, true) then return true; end