From 017513ca0066b399255c9b2bd02d4146d775b877 Mon Sep 17 00:00:00 2001 From: repo-worker-code-k Date: Tue, 10 Nov 2026 17:34:37 -0600 Subject: [PATCH] fix(id): take CapError by reference in subscription_refused_event Salvage of PR #7148 onto current main (task 14684): the tags.rs expect() hunks are superseded by the Result-returning parse_search_query rewrite on main; this keeps the one live change - subscription_refused_event borrowed CapError - at its new home in id-core. --- pkgs/id/crates/id-core/src/world_caps.rs | 2 +- pkgs/id/src/world/actor.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/id/crates/id-core/src/world_caps.rs b/pkgs/id/crates/id-core/src/world_caps.rs index 66515406a1..a3aaceb94c 100644 --- a/pkgs/id/crates/id-core/src/world_caps.rs +++ b/pkgs/id/crates/id-core/src/world_caps.rs @@ -942,7 +942,7 @@ pub fn result_event(id: &str, outcome: Result) -> S /// The event delivered when a subscription is refused. #[must_use] -pub fn subscription_refused_event(spec: &str, error: CapError) -> String { +pub fn subscription_refused_event(spec: &str, error: &CapError) -> String { let mut event = serde_json::json!({"cap":"subscription","spec":spec,"ok":false,"error":error.code()}); if let Some(reason) = error.reason() { diff --git a/pkgs/id/src/world/actor.rs b/pkgs/id/src/world/actor.rs index c8bc11f733..6d063688f3 100644 --- a/pkgs/id/src/world/actor.rs +++ b/pkgs/id/src/world/actor.rs @@ -767,7 +767,7 @@ impl WorldActor { "time.tick interval {ms}ms is below the world minimum {}ms", self.core.limits.min_tick_ms )); - self.deliver(crate::world_caps::subscription_refused_event(&spec, error)) + self.deliver(crate::world_caps::subscription_refused_event(&spec, &error)) .await; } continue; @@ -784,7 +784,7 @@ impl WorldActor { Decision::Deny(error) => { let spec = sub.spec(); if self.denied_subs.insert(spec.clone()) { - self.deliver(crate::world_caps::subscription_refused_event(&spec, error)) + self.deliver(crate::world_caps::subscription_refused_event(&spec, &error)) .await; } }