Release alpha 0.6.8 autochess legacy state fix
check / local-gate (push) Failing after 1m33s

This commit is contained in:
JWeBot Contributors
2026-10-15 18:18:00 +08:00
parent 3dea42b268
commit 5125b827c0
17 changed files with 95 additions and 21 deletions
@@ -4,11 +4,11 @@ build-backend = "setuptools.build_meta"
[project]
name = "jwebot-official-extensions"
version = "0.6.7a0+1015"
version = "0.6.8a0+1015"
description = "Reviewed local command adapters and broker implementation for JWeBot"
requires-python = ">=3.9"
dependencies = [
"jwebot-sdk==0.6.7a0+1015",
"jwebot-sdk==0.6.8a0+1015",
]
[tool.setuptools.packages.find]
@@ -90,4 +90,4 @@ __all__ = [
"render_feature_list",
]
__version__ = "0.6.7a0+1015"
__version__ = "0.6.8a0+1015"
@@ -2834,7 +2834,16 @@ class CsMajorAutochess:
if action == "unknown":
return respond(state, self.rules())
if action == "create":
if state is not None and state.get("status") in {"registration", "active"}:
legacy_active = (
state is not None
and state.get("status") in {"registration", "active"}
and int(state.get("schema_version") or 0) < 3
)
if (
state is not None
and state.get("status") in {"registration", "active"}
and not legacy_active
):
return respond(
state,
f"{state['event_title']} 已在进行中;发送 /自走棋状态 查看",
@@ -2878,6 +2887,8 @@ class CsMajorAutochess:
f"{state['event_title']} 开放报名;主持人 {display_name} 已自动加入。"
"支持 2~8 人;发送 /自走棋报名,主持人发送 /自走棋开赛。"
)
if legacy_active:
text = "已保留旧版未完成赛事档案,并开启新版赛季。" + text
story = _story(state, "registration_open", text, {"host_person_key": person_key})
return respond(state, text, stories=[story])
if state is None: