Software / code / prosody
Comparison
plugins/mod_vcard.lua @ 9228:e2e2aa76ea31
mod_private, mod_vcard: Use the usual comment on non-get received iqs.
| author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
|---|---|
| date | Fri, 24 Aug 2018 20:36:06 +0200 |
| parent | 9219:3ce18a4018f4 |
| child | 10552:f1cf8c08a09d |
comparison
equal
deleted
inserted
replaced
| 9227:c0e058633d9a | 9228:e2e2aa76ea31 |
|---|---|
| 27 if vCard then | 27 if vCard then |
| 28 session.send(st.reply(stanza):add_child(vCard)); -- send vCard! | 28 session.send(st.reply(stanza):add_child(vCard)); -- send vCard! |
| 29 else | 29 else |
| 30 session.send(st.error_reply(stanza, "cancel", "item-not-found")); | 30 session.send(st.error_reply(stanza, "cancel", "item-not-found")); |
| 31 end | 31 end |
| 32 else | 32 else -- stanza.attr.type == "set" |
| 33 if not to then | 33 if not to then |
| 34 if vcards:set(session.username, st.preserialize(stanza.tags[1])) then | 34 if vcards:set(session.username, st.preserialize(stanza.tags[1])) then |
| 35 session.send(st.reply(stanza)); | 35 session.send(st.reply(stanza)); |
| 36 else | 36 else |
| 37 -- TODO unable to write file, file may be locked, etc, what's the correct error? | 37 -- TODO unable to write file, file may be locked, etc, what's the correct error? |