Picker: share PR #218's guild_name field and its no-fallback-after-unlink rule
A server an org explicitly unlinked (unlinked_at) must not fall back to the default org in the picker either, or the founding org could stream into it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
62e6d69bfa
commit
a2c840f186
@@ -74,7 +74,7 @@ def test_directory_push_keeps_org_link(fs):
|
||||
run(web.put_guild_directory("100", body, {"service": True}))
|
||||
g = fs.get("discord_guilds", "100")
|
||||
assert g["org_id"] == ORG
|
||||
assert g["name"] == "Fire Co. 7 (renamed)"
|
||||
assert g["guild_name"] == "Fire Co. 7 (renamed)"
|
||||
assert [c["channel_id"] for c in g["voice_channels"]] == ["1003"]
|
||||
|
||||
|
||||
@@ -112,6 +112,10 @@ def test_options_unlinked_fallback_follows_bot_rule(fs, monkeypatch):
|
||||
got = {g["guild_id"]: g for g in run(web.join_options("n1", OWNER))["guilds"]}
|
||||
assert got["300"]["linked"] is False
|
||||
assert "200" not in got
|
||||
# An org that explicitly unlinked its server (PR #218) never falls back.
|
||||
fs.put("discord_guilds", "300", {"guild_id": "300", "org_id": None, "unlinked_at": "2026-10-04T00:00:00+00:00",
|
||||
"guild_name": "Unlinked", "voice_channels": []})
|
||||
assert "300" not in [g["guild_id"] for g in run(web.join_options("n1", OWNER))["guilds"]]
|
||||
|
||||
|
||||
def test_options_other_org_node_is_404(fs):
|
||||
|
||||
Reference in New Issue
Block a user