# HG changeset patch # User Kim Alvefur # Date 1403721995 -7200 # Node ID 097c6af98d0a49ed6c468bd386b95cd3be7f5927 # Parent 843769eb40c331a1573326b3e5afd420f91d5968# Parent d31ace5b1175c61ec315f5584ce7c816643af89b Merge diff -r d31ace5b1175 -r 097c6af98d0a mod_profile/mod_profile.lua --- a/mod_profile/mod_profile.lua Tue Jun 24 12:16:44 2014 -0400 +++ b/mod_profile/mod_profile.lua Wed Jun 25 20:46:35 2014 +0200 @@ -6,6 +6,7 @@ local vcard = require"util.vcard"; local base64 = require"util.encodings".base64; local sha1 = require"util.hashes".sha1; +local t_insert, t_remove = table.insert, table.remove; local pep_plus; if module:get_host_type() == "local" and module:get_option_boolean("vcard_to_pep", true) then @@ -44,10 +45,13 @@ local function update_pep(username, data) local pep = pep_plus.get_pep_service(username.."@"..module.host); + local photo, p = get_item(data, "PHOTO"); if vcard.to_vcard4 then + if p then t_remove(data, p); end pep:purge("urn:xmpp:vcard4", true); pep:publish("urn:xmpp:vcard4", true, "current", st.stanza("item", {id="current"}) :add_child(vcard.to_vcard4(data))); + if p then t_insert(data, p, photo); end end local nickname = get_item(data, "NICKNAME"); @@ -57,7 +61,6 @@ :tag("nick", { xmlns="http://jabber.org/protocol/nick" }):text(nickname[1])); end - local photo = get_item(data, "PHOTO"); if photo and photo[1] then local photo_raw = base64.decode(photo[1]); local photo_hash = sha1(photo_raw, true); diff -r d31ace5b1175 -r 097c6af98d0a mod_rawdebug/mod_rawdebug.lua --- a/mod_rawdebug/mod_rawdebug.lua Tue Jun 24 12:16:44 2014 -0400 +++ b/mod_rawdebug/mod_rawdebug.lua Wed Jun 25 20:46:35 2014 +0200 @@ -1,8 +1,9 @@ +module:set_global(); local tostring = tostring; local filters = require "util.filters"; -local def_env = module:shared("/*/admin_telnet/env"); +local def_env = module:shared("admin_telnet/env"); local rawdebug_enabled = module:shared("sessions"); local full_sessions = prosody.full_sessions; local log = module._log;