Changeset

184:6528845e8673

mod_vcard: Fixed to use new util.stanza.add_child
author Waqas Hussain <waqas20@gmail.com>
date Sun, 26 Oct 2008 21:21:38 +0500
parents 183:403db3b5c3c2
children 185:a67c88ce1c6a
files plugins/mod_vcard.lua
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_vcard.lua	Sun Oct 26 21:19:49 2008 +0500
+++ b/plugins/mod_vcard.lua	Sun Oct 26 21:21:38 2008 +0500
@@ -24,9 +24,7 @@
 						vCard = st.deserialize(datamanager.load(session.username, session.host, "vCard"));-- load user's own vCard
 					end
 					if vCard then
-						local iq = st.reply(stanza);
-						iq:add_child(vCard);
-						send(session, iq); -- send vCard!
+						send(session, st.reply(stanza):add_child(vCard)); -- send vCard!
 					else
 						send(session, st.error_reply(stanza, "cancel", "item-not-found"));
 					end