Comparison

plugins/mod_vcard_legacy.lua @ 10118:199dae5b6f11

mod_vcard_legacy: Complete roundtrip support for ORG/ORGNAME vcard-temp -> vcard4 worked previously but not the other way around
author Kim Alvefur <zash@zash.se>
date Fri, 02 Aug 2019 21:57:57 +0200
parent 10117:8643b784626c
child 10215:82abf88db13f
comparison
equal deleted inserted replaced
10117:8643b784626c 10118:199dae5b6f11
108 elseif tag.name == "impp" then 108 elseif tag.name == "impp" then
109 local uri = tag:get_child_text("uri"); 109 local uri = tag:get_child_text("uri");
110 if uri and uri:sub(1, 5) == "xmpp:" then 110 if uri and uri:sub(1, 5) == "xmpp:" then
111 vcard_temp:text_tag("JABBERID", uri:sub(6)) 111 vcard_temp:text_tag("JABBERID", uri:sub(6))
112 end 112 end
113 elseif tag.name == "org" then
114 vcard_temp:tag("ORG")
115 :text_tag("ORGNAME", tag:get_child_text("text"))
116 :up();
113 end 117 end
114 end 118 end
115 end 119 end
116 120
117 local meta_ok, avatar_meta = pep_service:get_items("urn:xmpp:avatar:metadata", stanza.attr.from); 121 local meta_ok, avatar_meta = pep_service:get_items("urn:xmpp:avatar:metadata", stanza.attr.from);