vCard = st.deserialize(datamanager.load(session.username, session.host, "vCard"));-- load user's own vCard
end
if vCard then
vCard = st.deserialize(datamanager.load(session.username, session.host, "vCard"));-- load user's own vCard
end
if vCard then
- send(session, st.error_reply(stanza, "cancel", "item-not-found"));
+ session.send(st.error_reply(stanza, "cancel", "item-not-found"));
end
elseif stanza.attr.type == "set" then
if not to or to == session.username.."@"..session.host then
if datamanager.store(session.username, session.host, "vCard", st.preserialize(stanza.tags[1])) then
end
elseif stanza.attr.type == "set" then
if not to or to == session.username.."@"..session.host then
if datamanager.store(session.username, session.host, "vCard", st.preserialize(stanza.tags[1])) then
else
-- TODO unable to write file, file may be locked, etc, what's the correct error?
else
-- TODO unable to write file, file may be locked, etc, what's the correct error?
- send(session, st.error_reply(stanza, "wait", "internal-server-error"));
+ session.send(st.error_reply(stanza, "wait", "internal-server-error"));
- send(session, st.error_reply(stanza, "auth", "forbidden"));
+ session.send(st.error_reply(stanza, "auth", "forbidden"));