Software /
code /
prosody
Comparison
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 |
comparison
equal
deleted
inserted
replaced
183:403db3b5c3c2 | 184:6528845e8673 |
---|---|
22 end | 22 end |
23 else | 23 else |
24 vCard = st.deserialize(datamanager.load(session.username, session.host, "vCard"));-- load user's own vCard | 24 vCard = st.deserialize(datamanager.load(session.username, session.host, "vCard"));-- load user's own vCard |
25 end | 25 end |
26 if vCard then | 26 if vCard then |
27 local iq = st.reply(stanza); | 27 send(session, st.reply(stanza):add_child(vCard)); -- send vCard! |
28 iq:add_child(vCard); | |
29 send(session, iq); -- send vCard! | |
30 else | 28 else |
31 send(session, st.error_reply(stanza, "cancel", "item-not-found")); | 29 send(session, st.error_reply(stanza, "cancel", "item-not-found")); |
32 end | 30 end |
33 elseif stanza.attr.type == "set" then | 31 elseif stanza.attr.type == "set" then |
34 if not to or to == session.username.."@"..session.host then | 32 if not to or to == session.username.."@"..session.host then |