diff options
author | daurnimator <quae@daurnimator.com> | 2014-06-05 17:07:14 -0400 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2014-06-05 17:07:14 -0400 |
commit | 7fa36918b0198b806059172a6221f3e776cfde53 (patch) | |
tree | 87cbe024b36c3991e170e4ecc1164bf31a8344d2 /plugins/muc/occupant.lib.lua | |
parent | a1dbf229a35ea904e520b9a4508f024735a2b4ee (diff) | |
download | prosody-7fa36918b0198b806059172a6221f3e776cfde53.tar.gz prosody-7fa36918b0198b806059172a6221f3e776cfde53.zip |
plugins/muc: Move 'x' filtering from occupant to util
Diffstat (limited to 'plugins/muc/occupant.lib.lua')
-rw-r--r-- | plugins/muc/occupant.lib.lua | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/plugins/muc/occupant.lib.lua b/plugins/muc/occupant.lib.lua index 6a3f7df4..d59252e2 100644 --- a/plugins/muc/occupant.lib.lua +++ b/plugins/muc/occupant.lib.lua @@ -2,21 +2,10 @@ local next = next; local pairs = pairs; local setmetatable = setmetatable; local st = require "util.stanza"; +local util = module:require "muc/util"; -local get_filtered_presence do - local presence_filters = { - ["http://jabber.org/protocol/muc"] = true; - ["http://jabber.org/protocol/muc#user"] = true; - } - local function presence_filter(tag) - if presence_filters[tag.attr.xmlns] then - return nil; - end - return tag; - end - function get_filtered_presence(stanza) - return st.clone(stanza):maptags(presence_filter); - end +local function get_filtered_presence(stanza) + return util.filter_muc_x(st.clone(stanza)); end local occupant_mt = {}; |