feat(api): sessions加is_del过滤+filehelper置顶标记,accounts加avatar(raw_json提取)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -103,6 +103,10 @@ async def list_accounts(
|
||||
* WeChat: account_id=wx_id, nickname=nick_name, user_id, user_name, phone,
|
||||
contacts_num, group_num, is_on_job, raw_json (verbatim upstream record).
|
||||
* WhatsApp: account_id=uid (+ same projection).
|
||||
|
||||
``avatar`` is extracted from ``raw_json.headImageUrl`` (WeChat wxUser/list
|
||||
records carry it; WhatsApp businessSalesList records have no avatar key,
|
||||
so they naturally resolve to ``None`` — same key logic for both channels).
|
||||
"""
|
||||
wechat_q = sa.select(
|
||||
WechatAccount.wx_id.label("account_id"),
|
||||
@@ -171,6 +175,9 @@ async def list_accounts(
|
||||
contacts_num=row.contacts_num,
|
||||
group_num=row.group_num,
|
||||
is_on_job=row.is_on_job,
|
||||
# 头像从原始记录提取(对齐云客员工聊天窗口左侧头像,2026-08-25):
|
||||
# WeChat headImageUrl;WA 原始记录无该键 -> None
|
||||
avatar=(row.raw_json or {}).get("headImageUrl"),
|
||||
raw_json=row.raw_json,
|
||||
)
|
||||
for row in rows
|
||||
|
||||
Reference in New Issue
Block a user