diff options
author | Kim Alvefur <zash@zash.se> | 2019-08-02 21:57:57 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-08-02 21:57:57 +0200 |
commit | fabd896892e40eda501c12704025df7cb7c16654 (patch) | |
tree | c786ee91e7b0fa0b7cd6b563d5cb7b8275d76fc6 | |
parent | 03acf1ffe1b8abc3b457075bd46be5ac1b491f2c (diff) | |
download | prosody-fabd896892e40eda501c12704025df7cb7c16654.tar.gz prosody-fabd896892e40eda501c12704025df7cb7c16654.zip |
mod_vcard_legacy: Complete roundtrip support for ORG/ORGNAME
vcard-temp -> vcard4 worked previously but not the other way around
-rw-r--r-- | plugins/mod_vcard_legacy.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/mod_vcard_legacy.lua b/plugins/mod_vcard_legacy.lua index 45988fa8..89ef1a4f 100644 --- a/plugins/mod_vcard_legacy.lua +++ b/plugins/mod_vcard_legacy.lua @@ -110,6 +110,10 @@ module:hook("iq-get/bare/vcard-temp:vCard", function (event) if uri and uri:sub(1, 5) == "xmpp:" then vcard_temp:text_tag("JABBERID", uri:sub(6)) end + elseif tag.name == "org" then + vcard_temp:tag("ORG") + :text_tag("ORGNAME", tag:get_child_text("text")) + :up(); end end end |