fix(qzone): 修复子评论回复逻辑

移除手动构造的@提醒内容,改为通过传递 `parent_tid` 参数来正确指定父评论。
这利用了平台原生的回复机制,可以更可靠地实现回复和提醒功能。
This commit is contained in:
tt-P607
2025-09-04 14:44:35 +08:00
committed by Windpicker-owo
parent c76fddd928
commit a5b5cdddb1

View File

@@ -791,10 +791,11 @@ class QZoneService:
try:
# 修复回复逻辑:确保能正确提醒被回复的人
data = {
"topicId": f"{host_qq}_{fid}__1", # 使用标准评论格式,而不是针对特定评论
"topicId": f"{host_qq}_{fid}__1",
"parent_tid": comment_tid,
"uin": uin,
"hostUin": host_qq,
"content": f"回复@{target_name}{content}", # 内容中明确标示回复对象
"content": content,
"format": "fs",
"plat": "qzone",
"source": "ic",
@@ -802,11 +803,13 @@ class QZoneService:
"ref": "feeds",
"richtype": "",
"richval": "",
"paramstr": f"@{target_name}", # 确保触发@提醒机制
"paramstr": "",
}
# 记录详细的请求参数用于调试
logger.info(f"子回复请求参数: topicId={data['topicId']}, parent_tid={data['parent_tid']}, content='{content[:50]}...'")
logger.info(
f"子回复请求参数: topicId={data['topicId']}, parent_tid={data['parent_tid']}, content='{content[:50]}...'"
)
await _request("POST", self.REPLY_URL, params={"g_tk": gtk}, data=data)
return True