fix(priority): keep readable priority sync details
This commit is contained in:
@@ -93,18 +93,18 @@ def format_dingtalk_priority_changed(
|
||||
emoji = {"success": "✅", "failed": "❌", "skipped": "⏭️"}.get(u.get("status", ""), "➖")
|
||||
acc_name = u.get("account_name") or u.get("account_id") or "未知账号"
|
||||
acc_id = u.get("account_id") or "未知ID"
|
||||
|
||||
|
||||
old_p = u.get("old_priority")
|
||||
old_p_str = "未知" if old_p in (None, "", "未知") else str(old_p)
|
||||
|
||||
|
||||
new_p = u.get("new_priority")
|
||||
new_p_str = "未知" if new_p in (None, "", "未知") else str(new_p)
|
||||
|
||||
|
||||
src_group = u.get("source_group_name") or u.get("source_group_id") or "未知来源"
|
||||
|
||||
|
||||
rate = u.get("source_rate")
|
||||
rate_str = str(rate) if rate is not None else "—"
|
||||
|
||||
|
||||
line = f"- {emoji} {acc_name}(账号ID {acc_id}):old={old_p_str} → new={new_p_str},来源分组={src_group},倍率={rate_str}"
|
||||
if u.get("status") == "failed" and u.get("message"):
|
||||
line += f",原因={u.get('message')}"
|
||||
|
||||
Reference in New Issue
Block a user