Changeset

1780:668ce0a2050d

MUC: Added a send() method to the component. Fixes issues with local mod_vcard.
author Waqas Hussain <waqas20@gmail.com>
date Mon, 14 Sep 2009 02:08:20 +0500
parents 1779:3da808c7bfa2
children 1781:b3eee6151592
files plugins/muc/mod_muc.lua
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/muc/mod_muc.lua	Mon Sep 14 01:13:17 2009 +0500
+++ b/plugins/muc/mod_muc.lua	Mon Sep 14 02:08:20 2009 +0500
@@ -123,6 +123,11 @@
 	-- 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 };