mod_vcard_legacy: Complete roundtrip support for ORG/ORGNAME
authorKim Alvefur <zash@zash.se>
Fri, 02 Aug 2019 21:57:57 +0200
changeset 10122 199dae5b6f11
parent 10121 8643b784626c
child 10123 29733134c76c
mod_vcard_legacy: Complete roundtrip support for ORG/ORGNAME vcard-temp -> vcard4 worked previously but not the other way around
plugins/mod_vcard_legacy.lua
--- a/plugins/mod_vcard_legacy.lua	Sat Jan 19 22:01:54 2019 +0100
+++ b/plugins/mod_vcard_legacy.lua	Fri Aug 02 21:57:57 2019 +0200
@@ -110,6 +110,10 @@
 				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