Changed the datastore for vCards from vCard to vcard in mod_vcard and mod_register

Fri, 05 Dec 2008 00:16:03 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Fri, 05 Dec 2008 00:16:03 +0500
changeset 549
c0947c0af398
parent 547
265c4b8f0a8a
child 550
56bdfae9e4ea

Changed the datastore for vCards from vCard to vcard in mod_vcard and mod_register

plugins/mod_register.lua file | annotate | diff | comparison | revisions
plugins/mod_vcard.lua file | annotate | diff | comparison | revisions
--- a/plugins/mod_register.lua	Thu Dec 04 23:40:15 2008 +0500
+++ b/plugins/mod_register.lua	Fri Dec 05 00:16:03 2008 +0500
@@ -51,7 +51,7 @@
 				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;
--- a/plugins/mod_vcard.lua	Thu Dec 04 23:40:15 2008 +0500
+++ b/plugins/mod_vcard.lua	Fri Dec 05 00:16:03 2008 +0500
@@ -39,10 +39,10 @@
 					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 @@
 					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 @@
 		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

mercurial