Software /
code /
prosody-modules
Comparison
mod_profile/mod_profile.lua @ 1441:07c9306c2c1f
mod_profile: Don't pass old vcard data trough vcard lib
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 20 Jun 2014 18:14:26 +0200 |
parent | 1424:9892a537e7fc |
child | 1442:253e374824a8 |
comparison
equal
deleted
inserted
replaced
1440:78133eb11e7d | 1441:07c9306c2c1f |
---|---|
85 if to then username = jid_split(to); end | 85 if to then username = jid_split(to); end |
86 local data = storage:get(username); | 86 local data = storage:get(username); |
87 if not data then | 87 if not data then |
88 data = legacy_storage:get(username); | 88 data = legacy_storage:get(username); |
89 data = data and st.deserialize(data); | 89 data = data and st.deserialize(data); |
90 if data then | |
91 return origin.send(st.reply(stanza):add_child(data)); | |
92 end | |
90 end | 93 end |
91 if not data then | 94 if not data then |
92 return origin.send(st.error_reply(stanza, "cancel", "item-not-found")); | 95 return origin.send(st.error_reply(stanza, "cancel", "item-not-found")); |
93 end | 96 end |
94 return origin.send(st.reply(stanza):add_child(vcard.to_xep54(data))); | 97 return origin.send(st.reply(stanza):add_child(vcard.to_xep54(data))); |