mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
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>
This commit is contained in:
parent
139d6dbda5
commit
fb0d6a4ea0
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user