plugins/mod_vcard.lua

changeset 2344
1e27e0092f19
parent 2004
5033348feba8
child 2923
b7049746bd29
equal deleted inserted replaced
2343:4b05fd561cbd 2344:1e27e0092f19
49 -- COMPAT: https://support.process-one.net/browse/EJAB-1045 49 -- COMPAT: https://support.process-one.net/browse/EJAB-1045
50 if module:get_option("vcard_compatibility") then 50 if module:get_option("vcard_compatibility") then
51 module:hook("iq/full", function(data) 51 module:hook("iq/full", function(data)
52 local stanza = data.stanza; 52 local stanza = data.stanza;
53 local payload = stanza.tags[1]; 53 local payload = stanza.tags[1];
54 if stanza.attr.type == "get" or stanza.attr.type == "set" and payload.name == "vCard" and payload.attr.xmlns == "vcard-temp" then 54 if stanza.attr.type == "get" and payload.name == "vCard" and payload.attr.xmlns == "vcard-temp" then
55 return handle_vcard(data); 55 return handle_vcard(data);
56 end 56 end
57 end, 1); 57 end, 1);
58 end 58 end

mercurial