diff options
author | Waqas Hussain <waqas20@gmail.com> | 2008-12-05 00:16:03 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2008-12-05 00:16:03 +0500 |
commit | 8ee9223d6afde1153d95332cde2254dbe9583540 (patch) | |
tree | 8bce2458ff07a475b0730811e2b871d20674e982 | |
parent | 83fc91cb1069a562620d2220c2b0c0afdc609a22 (diff) | |
download | prosody-8ee9223d6afde1153d95332cde2254dbe9583540.tar.gz prosody-8ee9223d6afde1153d95332cde2254dbe9583540.zip |
Changed the datastore for vCards from vCard to vcard in mod_vcard and mod_register
-rw-r--r-- | plugins/mod_register.lua | 2 | ||||
-rw-r--r-- | plugins/mod_vcard.lua | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/plugins/mod_register.lua b/plugins/mod_register.lua index 29474461..cc02a5bc 100644 --- a/plugins/mod_register.lua +++ b/plugins/mod_register.lua @@ -51,7 +51,7 @@ module:add_iq_handler("c2s", "jabber:iq:register", function (session, stanza) end -- TODO datamanager should be able to delete all user data itself datamanager.store(session.username, session.host, "roster", nil); - datamanager.store(session.username, session.host, "vCard", nil); + datamanager.store(session.username, session.host, "vcard", nil); datamanager.store(session.username, session.host, "private", nil); datamanager.store(session.username, session.host, "offline", nil); local bare = session.username.."@"..session.host; diff --git a/plugins/mod_vcard.lua b/plugins/mod_vcard.lua index 4f78867b..fc71bb1b 100644 --- a/plugins/mod_vcard.lua +++ b/plugins/mod_vcard.lua @@ -39,10 +39,10 @@ module:add_iq_handler({"c2s", "s2sin"}, "vcard-temp", if to then local node, host = jid_split(to); if hosts[host] and hosts[host].type == "local" then - vCard = st.deserialize(datamanager.load(node, host, "vCard")); -- load vCard for user or server + vCard = st.deserialize(datamanager.load(node, host, "vcard")); -- load vCard for user or server end else - vCard = st.deserialize(datamanager.load(session.username, session.host, "vCard"));-- load user's own vCard + vCard = st.deserialize(datamanager.load(session.username, session.host, "vcard"));-- load user's own vCard end if vCard then session.send(st.reply(stanza):add_child(vCard)); -- send vCard! @@ -51,7 +51,7 @@ module:add_iq_handler({"c2s", "s2sin"}, "vcard-temp", 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 + if datamanager.store(session.username, session.host, "vcard", st.preserialize(stanza.tags[1])) then session.send(st.reply(stanza)); else -- TODO unable to write file, file may be locked, etc, what's the correct error? @@ -66,8 +66,8 @@ module:add_iq_handler({"c2s", "s2sin"}, "vcard-temp", end); local feature_vcard_attr = { var='vcard-temp' }; -module:add_event_hook("stream-features", - function (session, features) +module:add_event_hook("stream-features", + function (session, features) if session.type == "c2s" then features:tag("feature", feature_vcard_attr):up(); end |