Changeset

1629:f6af348cf497

ejabberdsql2prosody: Added support for vCards
author Waqas Hussain <waqas20@gmail.com>
date Sun, 02 Aug 2009 14:35:41 +0500
parents 1628:c3ce7cbd123d
children 1630:cb3d937dd1da
files tools/ejabberdsql2prosody.lua
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tools/ejabberdsql2prosody.lua	Sun Aug 02 14:35:03 2009 +0500
+++ b/tools/ejabberdsql2prosody.lua	Sun Aug 02 14:35:41 2009 +0500
@@ -310,3 +310,7 @@
 for i, row in ipairs(t["rostergroups"] or NULL) do
 	roster_group(row.username, host, row.jid, row.grp);
 end
+for i, row in ipairs(t["vcard"] or NULL) do
+	local ret, err = dm.store(row.username, host, "vcard", st.preserialize(parse_xml(row.vcard)));
+	print("["..(err or "success").."] vCard: "..row.username.."@"..host);
+end