diff --git a/cmd/cyrene/wire.go b/cmd/cyrene/wire.go index 202369e..6878d3c 100644 --- a/cmd/cyrene/wire.go +++ b/cmd/cyrene/wire.go @@ -648,6 +648,7 @@ func (a *app) wireFrontend() error { return fmt.Errorf("gateway: %w", err) } gw.SetVoice(a.voice) + a.gw = gw // assign BEFORE wiring hooks below, which capture a.gw / gw (nil-receiver panic otherwise) if a.channelBridge != nil { // Route the channel bridge's owner-private persisted messages into the same // `message_persisted` broadcast the orchestrator uses, so the Web client mirrors @@ -660,9 +661,9 @@ func (a *app) wireFrontend() error { a.gw.AuditEvent("bridge:"+msg.Platform, "channel.reject", reason) }) } - a.gw = gw a.capacitySink = gw + // Wire the backthink proactive sinks now that the gateway hub (active-client // route) and the channel bridge (IM fallback) both exist. They were absent when // backthink.New ran (the hub needs the loop and the bridge needs the loop and the