changeset 4681:edbd84bbd8fb

mod_smacks: Include username in offline event, mirroring Prosody 0.10+ See Prosody rev 03714861f8fc and 72a2b85c0537
author Kim Alvefur <zash@zash.se>
date Sun, 12 Sep 2021 21:14:26 +0200 (2021-09-12)
parents 59fdda04b87e
children e4e5474420e6
files mod_smacks/mod_smacks.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_smacks/mod_smacks.lua	Sun Sep 12 19:27:06 2021 +0100
+++ b/mod_smacks/mod_smacks.lua	Sun Sep 12 21:14:26 2021 +0200
@@ -461,7 +461,7 @@
 			local sessions = prosody.hosts[module.host].sessions[session.username] and
 					prosody.hosts[module.host].sessions[session.username].sessions or nil;
 			if sessions and next(sessions) == session.resource and next(sessions, session.resource) == nil then
-				local ok = module:fire_event("message/offline/handle", { origin = session, stanza = stanza } );
+				local ok = module:fire_event("message/offline/handle", { origin = session, username = session.username, stanza = stanza });
 				session.log("debug", "mod_smacks delivery/failuere returning %s for offline-handled stanza", tostring(ok));
 				return ok;			-- if stanza was handled, don't send an error
 			end