# HG changeset patch # User Matthew Wild # Date 1770809935 0 # Node ID d7f2ffc2527367b7e9f288a59474be3a80d53713 # Parent 2462247ec377c062c5fb5f74c94962cdade76737 mod_carbons: Fix some carbons decision-making bugs (fixes #1861) This was introduced when refactoring into an event in commit 063ce658c181 (released in 0.12.0). Known policies to be affected: - Copying of outgoing MUC PMs (#1861) - Copying of archived stanzas (if not copied by other rules) diff -r 2462247ec377 -r d7f2ffc25273 plugins/mod_carbons.lua --- a/plugins/mod_carbons.lua Mon Feb 09 18:30:57 2026 +0100 +++ b/plugins/mod_carbons.lua Wed Feb 11 11:38:55 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;