From fb0d6a4ea0e680f6be1eb8a9ff8f9b8df15717d2 Mon Sep 17 00:00:00 2001 From: npub1jh9wn95s0472h86ahapupaf7m6kx4v9sx2n0atj2hltcfer8k06s5n3pyf <95cae996907d7cab9f5dbf43c0f53edeac6ab0b032a6feae4abfd784e467b3f5@sprout-oss.stage.blox.sqprod.co> Date: Fri, 26 Jun 2026 22:29:59 -0400 Subject: [PATCH] fix(relay): use deployment tenant binding for startup membership Co-authored-by: npub1jh9wn95s0472h86ahapupaf7m6kx4v9sx2n0atj2hltcfer8k06s5n3pyf <95cae996907d7cab9f5dbf43c0f53edeac6ab0b032a6feae4abfd784e467b3f5@sprout-oss.stage.blox.sqprod.co> Signed-off-by: npub1jh9wn95s0472h86ahapupaf7m6kx4v9sx2n0atj2hltcfer8k06s5n3pyf <95cae996907d7cab9f5dbf43c0f53edeac6ab0b032a6feae4abfd784e467b3f5@sprout-oss.stage.blox.sqprod.co> --- crates/buzz-relay/src/main.rs | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/crates/buzz-relay/src/main.rs b/crates/buzz-relay/src/main.rs index e66666a35..42f00b681 100644 --- a/crates/buzz-relay/src/main.rs +++ b/crates/buzz-relay/src/main.rs @@ -300,18 +300,11 @@ async fn main() -> anyhow::Result<()> { // host (single-community per deployment), failing closed if the host // isn't mapped — the membership list is community-scoped now, so the // relay-signed startup publish must carry a resolved tenant. - let raw_host = url::Url::parse( - &startup_state - .config - .relay_url - .replace("ws://", "http://") - .replace("wss://", "https://"), + let tenant = match buzz_relay::tenant::bind_deployment_community( + &startup_state.db, + &startup_state.config.relay_url, ) - .ok() - .and_then(|u| u.host_str().map(|h| h.to_string())) - .unwrap_or_default(); - let tenant = match buzz_relay::tenant::bind_community(&startup_state.db, &raw_host) - .await + .await { Ok(ctx) => ctx, Err(e) => {