koishi-plugin-foxy-daily 0.2.4 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/comments.js +5 -0
- package/package.json +1 -1
package/lib/comments.js
CHANGED
|
@@ -145,6 +145,11 @@ class CommentRunner {
|
|
|
145
145
|
if (!legacy) return undefined
|
|
146
146
|
const siblings = comments.filter((item) => String(item.id) === String(comment.id))
|
|
147
147
|
if (siblings.length <= 1) return legacy
|
|
148
|
+
// Qzone can reuse a raw comment id for a root comment and a nested reply.
|
|
149
|
+
// Legacy state has only the raw id; prefer the reply sibling because old
|
|
150
|
+
// flows usually consumed the nested reply first.
|
|
151
|
+
const replySibling = siblings.find((item) => item.kind === 'reply')
|
|
152
|
+
if (replySibling) return replySibling === comment ? legacy : undefined
|
|
148
153
|
return siblings[0] === comment ? legacy : undefined
|
|
149
154
|
}
|
|
150
155
|
|
package/package.json
CHANGED