Mercurial > prosody-hg
comparison plugins/mod_vcard.lua @ 13655:6902bb3dd196
mod_vcard: Fire event when vcard updated
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Thu, 06 Feb 2025 17:02:29 +0000 |
| parents | 39c35f7e6cfa |
| children | 4298e6565fec |
comparison
equal
deleted
inserted
replaced
| 13654:39c35f7e6cfa | 13655:6902bb3dd196 |
|---|---|
| 33 end | 33 end |
| 34 else -- stanza.attr.type == "set" | 34 else -- stanza.attr.type == "set" |
| 35 if not to then | 35 if not to then |
| 36 if vcards:set(session.username, st.preserialize(stanza.tags[1])) then | 36 if vcards:set(session.username, st.preserialize(stanza.tags[1])) then |
| 37 session.send(st.reply(stanza)); | 37 session.send(st.reply(stanza)); |
| 38 module:fire_event("vcard-updated", event); | |
| 38 else | 39 else |
| 39 -- TODO unable to write file, file may be locked, etc, what's the correct error? | 40 -- TODO unable to write file, file may be locked, etc, what's the correct error? |
| 40 session.send(st.error_reply(stanza, "wait", "internal-server-error")); | 41 session.send(st.error_reply(stanza, "wait", "internal-server-error")); |
| 41 end | 42 end |
| 42 else | 43 else |
