fix(qzone): 修复评论回复逻辑以确保正确触发@提醒
- 修改 topicId 格式使用标准评论格式而非针对特定评论 - 在回复内容中明确标示回复对象 "@用户名:" - 优化 paramstr 参数确保触发@提醒机制 - 添加详细注释说明修复目的
This commit is contained in:
@@ -785,13 +785,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}__{comment_tid}",
|
"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",
|
||||||
@@ -799,7 +800,7 @@ class QZoneService:
|
|||||||
"ref": "feeds",
|
"ref": "feeds",
|
||||||
"richtype": "",
|
"richtype": "",
|
||||||
"richval": "",
|
"richval": "",
|
||||||
"paramstr": f"@{target_name} {content}",
|
"paramstr": f"@{target_name}", # 确保触发@提醒机制
|
||||||
}
|
}
|
||||||
await _request("POST", self.REPLY_URL, params={"g_tk": gtk}, data=data)
|
await _request("POST", self.REPLY_URL, params={"g_tk": gtk}, data=data)
|
||||||
return True
|
return True
|
||||||
|
|||||||
Reference in New Issue
Block a user