aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-09-14 02:08:20 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-09-14 02:08:20 +0500
commit77b771fe1573092c52fdacc35d235ca13734c295 (patch)
tree1b5dca242d14f139bb030642e5058ea5c106bd0e /plugins/muc
parent6d05213bd0c4ce08df557c6a20e730a5ba3c5a0c (diff)
downloadprosody-77b771fe1573092c52fdacc35d235ca13734c295.tar.gz
prosody-77b771fe1573092c52fdacc35d235ca13734c295.zip
MUC: Added a send() method to the component. Fixes issues with local mod_vcard.
Diffstat (limited to 'plugins/muc')
-rw-r--r--plugins/muc/mod_muc.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/muc/mod_muc.lua b/plugins/muc/mod_muc.lua
index 28002459..1b6dd3c2 100644
--- a/plugins/muc/mod_muc.lua
+++ b/plugins/muc/mod_muc.lua
@@ -123,6 +123,11 @@ component = register_component(muc_host, function(origin, stanza)
-- to the main muc domain
handle_to_domain(origin, stanza);
end);
+function component.send(stanza) -- FIXME do a generic fix
+ if stanza.attr.type == "result" or stanza.attr.type == "error" then
+ core_post_stanza(component, stanza);
+ else error("component.send only supports result and error stanzas at the moment"); end
+end
prosody.hosts[module:get_host()].muc = { rooms = rooms };