fix(qzone): 修复评论回复逻辑以确保正确触发@提醒

- 修改 topicId 格式使用标准评论格式而非针对特定评论
- 在回复内容中明确标示回复对象 "@用户名:"
- 优化 paramstr 参数确保触发@提醒机制
- 添加详细注释说明修复目的
This commit is contained in:
tt-P607
2025-09-01 13:08:04 +08:00
committed by Windpicker-owo
parent 91454fe576
commit 2abec18610

View File

@@ -787,14 +787,14 @@ class QZoneService:
return False return False
async def _reply(fid, host_qq, target_name, content, comment_tid): async def _reply(fid, host_qq, target_name, content, comment_tid):
"""回复评论""" """回复评论 - 修复为能正确提醒的回复格式"""
try: try:
# 构造需要的参数 # 修复回复逻辑:确保能正确提醒被回复的人
data = { data = {
"topicId": f"{host_qq}_{fid}_2", # 主题ID格式修改 "topicId": f"{host_qq}_{fid}__1", # 使用标准评论格式,而不是针对特定评论
"uin": uin, "uin": uin,
"hostUin": host_qq, "hostUin": host_qq,
"content": content, "content": f"回复@{target_name}{content}", # 内容中明确标示回复对象
"format": "fs", "format": "fs",
"plat": "qzone", "plat": "qzone",
"source": "ic", "source": "ic",
@@ -802,8 +802,7 @@ class QZoneService:
"ref": "feeds", "ref": "feeds",
"richtype": "", "richtype": "",
"richval": "", "richval": "",
"parent_tid": comment_tid, # 添加父评论ID "paramstr": f"@{target_name}", # 确保触发@提醒机制
"paramstr": f"@{target_name} {content}",
} }
# 记录详细的请求参数用于调试 # 记录详细的请求参数用于调试