From 1a9b2262c95a54a5a4527070d814dcccb692c56a Mon Sep 17 00:00:00 2001 From: Stefan Saenger Date: Thu, 23 Jul 2026 08:40:01 +0200 Subject: [PATCH] fix(fcm): use dot-call for prosody.events.fire_event so cache invalidation reaches MUC prosody.events.fire_event is a plain function (event_name, event_data), not a method. The colon form prosody.events:fire_event(name, data) passed the events table as event_name, so the lookup found no handlers and the vnc-fcm-invalidate-notify-cache / vcard-cache signals were silently lost. mod_vnc_muc_fcm hooks these via module:hook_global (which registers under the string event name), so its notify_cache was never invalidated cross-host. A stale empty cache entry for an MUC affiliate (left by an earlier test before the user had a token) then suppressed FCM pushes to that affiliate, breaking test_muc_fcm_push_to_offline_member in the full suite. Part-of: --- vnctalk/vnc_fcm_common.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vnctalk/vnc_fcm_common.lua b/vnctalk/vnc_fcm_common.lua index 19a8450..7646a50 100644 --- a/vnctalk/vnc_fcm_common.lua +++ b/vnctalk/vnc_fcm_common.lua @@ -136,12 +136,12 @@ function M.new(ctx) local function invalidateNotifyCacheGlobal(userName) invalidateNotifyCache(userName); - prosody.events:fire_event("vnc-fcm-invalidate-notify-cache", { username = userName }); + prosody.events.fire_event("vnc-fcm-invalidate-notify-cache", { username = userName }); end local function invalidateVcardCacheGlobal(userName) invalidateVcardCache(userName); - prosody.events:fire_event("vnc-fcm-invalidate-vcard-cache", { username = userName }); + prosody.events.fire_event("vnc-fcm-invalidate-vcard-cache", { username = userName }); end -- ─── display name ────────────────────────────────────────────────