--- a/mod_muc_inject_mentions/README.markdown Tue Dec 22 11:18:46 2020 +0100
+++ b/mod_muc_inject_mentions/README.markdown Tue Dec 22 11:27:20 2020 +0100
@@ -49,7 +49,7 @@
-- muc_inject_mentions_disabled_rooms = {"room@conferences.server.com"}
```
-If none or both are found, all rooms in the muc component will have mentions enabled.
+If none of these is set, all rooms in the muc component will have mentions enabled.
By default, if a message contains at least one mention,
--- a/mod_muc_inject_mentions/mod_muc_inject_mentions.lua Tue Dec 22 11:18:46 2020 +0100
+++ b/mod_muc_inject_mentions/mod_muc_inject_mentions.lua Tue Dec 22 11:27:20 2020 +0100
@@ -115,11 +115,9 @@
end
local function is_room_eligible(jid)
- if not enabled_rooms and not disabled_rooms then
- return true;
- end
+ if not enabled_rooms and not disabled_rooms then return true; end
- if enabled_rooms and not disabled_rooms then
+ if enabled_rooms then
for _, _jid in ipairs(enabled_rooms) do
if _jid == jid then
return true
@@ -128,7 +126,7 @@
return false
end
- if disabled_rooms and not enabled_rooms then
+ if disabled_rooms then
for _, _jid in ipairs(disabled_rooms) do
if _jid == jid then
return false
@@ -136,8 +134,6 @@
end
return true
end
-
- return true
end
local function has_nick_prefix(body, first)