Diff

plugins/mod_vcard.lua @ 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
parent 90:da468ed49a7b
child 195:08753eafbf46
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