aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/muc.lib.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2013-05-21 09:48:59 +0100
committerMatthew Wild <mwild1@gmail.com>2013-05-21 09:48:59 +0100
commitefe217c73fdae21c90ab0c5533f6829f36b6a274 (patch)
treecb10cbf6da2ee8134ae85bd76c2a5efcd3cc35b1 /plugins/muc/muc.lib.lua
parent8c3cb3971b29f84e8831f5ded9863cc282bfcde5 (diff)
downloadprosody-efe217c73fdae21c90ab0c5533f6829f36b6a274.tar.gz
prosody-efe217c73fdae21c90ab0c5533f6829f36b6a274.zip
mod_muc: Replace getText() with get_child_text(), 1 insertion, 12 deletions!
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-rw-r--r--plugins/muc/muc.lib.lua13
1 files changed, 1 insertions, 12 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index 68e36e83..4867b941 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -72,17 +72,6 @@ local function is_kickable_error(stanza)
local cond = get_error_condition(stanza);
return kickable_error_conditions[cond] and cond;
end
-local function getUsingPath(stanza, path, getText)
- local tag = stanza;
- for _, name in ipairs(path) do
- if type(tag) ~= 'table' then return; end
- tag = tag:child_with_name(name);
- end
- if tag and getText then tag = table.concat(tag); end
- return tag;
-end
-local function getTag(stanza, path) return getUsingPath(stanza, path); end
-local function getText(stanza, path) return getUsingPath(stanza, path, true); end
-----------
local room_mt = {};
@@ -867,7 +856,7 @@ function room_mt:handle_to_room(origin, stanza) -- presence changes and groupcha
else
local from = stanza.attr.from;
stanza.attr.from = current_nick;
- local subject = getText(stanza, {"subject"});
+ local subject = stanza:get_child_text("subject");
if subject then
if occupant.role == "moderator" or
( self._data.changesubject and occupant.role == "participant" ) then -- and participant