diff plugins/mod_carbons.lua @ 14071:54b30a374953

Merge 13.0->trunk
author Matthew Wild <mwild1@gmail.com>
date Wed, 11 Feb 2026 11:39:19 +0000
parents 0d162ef4e0c1 d7f2ffc25273
children d975d280baec
line wrap: on
line diff
--- a/plugins/mod_carbons.lua	Mon Feb 09 18:38:35 2026 +0100
+++ b/plugins/mod_carbons.lua	Wed Feb 11 11:39:19 2026 +0000
@@ -70,7 +70,7 @@
 end
 
 module:hook("carbons-should-copy", function (event)
-	local should, why = should_copy(event.stanza);
+	local should, why = should_copy(event.stanza, event.from_c2s, event.user_bare);
 	event.reason = why;
 	return should;
 end, -1)
@@ -107,7 +107,12 @@
 		return -- No use in sending carbons to an offline user
 	end
 
-	local event_payload = { stanza = stanza; session = origin };
+	local event_payload = {
+		stanza = stanza;
+		session = origin;
+		from_c2s = c2s;
+		user_bare = bare_jid;
+	};
 	local should = module:fire_event("carbons-should-copy", event_payload);
 	local why = event_payload.reason;