Skip to content

Commit e1b417e

Browse files
committed
fix(ui): refine Telegram result flows
1 parent f750dc9 commit e1b417e

12 files changed

Lines changed: 1699 additions & 213 deletions

src/handlers/group_handler.py

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -322,18 +322,26 @@ async def _process_domain_request(
322322
error = self._escape_detail(
323323
result.get("message", "未知错误")
324324
)
325-
result_text = (
326-
"❌ *处理失败*\n\n"
327-
f"`{safe_domain}`\n\n"
328-
f"{error}\n\n"
329-
"请稍后再次 @机器人。"
330-
)
325+
if result.get("submission_uncertain"):
326+
result_text = (
327+
"⚠️ *提交结果暂时无法确认*\n\n"
328+
f"`{safe_domain}`\n\n"
329+
"请先查询规则或查看 GitHub,避免重复提交。"
330+
)
331+
else:
332+
result_text = (
333+
"❌ *处理失败*\n\n"
334+
f"`{safe_domain}`\n\n"
335+
f"{error}\n\n"
336+
"请稍后再次 @机器人。"
337+
)
331338

332339
await processing_msg.edit_text(result_text, reply_markup=reply_markup, parse_mode='Markdown')
333340

334341
except Exception as e:
335342
logger.error(f"处理域名请求失败: {e}")
336343
added = bool(result and result.get("action") == "added")
344+
uncertain = bool(result and result.get("submission_uncertain"))
337345
visible_domain = (
338346
result.get("target_domain", domain) if added else domain
339347
)
@@ -344,6 +352,12 @@ async def _process_domain_request(
344352
f"`DOMAIN-SUFFIX,{safe_domain}`\n\n"
345353
"请先查看 GitHub,避免重复提交。"
346354
)
355+
elif uncertain:
356+
text = (
357+
"⚠️ *提交结果暂时无法确认*\n\n"
358+
f"`{safe_domain}`\n\n"
359+
"请先查询规则或查看 GitHub,避免重复提交。"
360+
)
347361
else:
348362
text = (
349363
"❌ *处理失败*\n\n"

0 commit comments

Comments
 (0)