Skip to content

Let's use AI to Earn!

feat: 排除自己和已经评论的

yikaJasonMic4ed5b82662bf
diff --git a/electron/main/reply/service.ts b/electron/main/reply/service.ts
index 621e3033..a2813e17 100644
--- a/electron/main/reply/service.ts
+++ b/electron/main/reply/service.ts
@@ -75,10 +75,22 @@ export class ReplyService {
content: element.content,
});
- platController.replyComment(account, element.commentId, aiRes, {
- dataId,
- comment: element,
- });
+ if (account.uid !== element.userId) {
+ let hadReply = false;
+ for (const reply of element.subCommentList) {
+ if (account.uid === reply.userId) {
+ hadReply = true;
+ break;
+ }
+ }
+
+ if (!hadReply) {
+ platController.replyComment(account, element.commentId, aiRes, {
+ dataId,
+ comment: element,
+ });
+ }
+ }
}
scheduleEvent({