# HG changeset patch # User Kim Alvefur # Date 1480803533 -3600 # Node ID b64c0150d6632ca8930c9c14cb475d9baa01d7f9 # Parent 9159f916689373b9b0fb7a9f5d2dde5396476a06 mod_profile: Add warning and debug logging in order to catch a weird event diff -r 9159f9166893 -r b64c0150d663 mod_profile/mod_profile.lua --- a/mod_profile/mod_profile.lua Sat Dec 03 20:00:08 2016 +0100 +++ b/mod_profile/mod_profile.lua Sat Dec 03 23:18:53 2016 +0100 @@ -143,7 +143,14 @@ local function on_publish(event) if event.actor == true then return end -- Not from a client local node, item = event.node, event.item; - local username = jid_split(event.actor); + local username, host = jid_split(event.actor); + if host ~= module.host then + module:log("warn", "on_publish() called for non-local actor"); + for k,v in pairs(event) do + module:log("debug", "event[%q] = %q", tosting(k), tostring(v)); + end + return; + end local data = storage:get(username) or {}; if node == "urn:xmpp:avatar:data" then local new_photo = item:get_child_text("data", "urn:xmpp:avatar:data");