From 70f709c8c39681ad84c64ea0cb8aef64e70df0ca Mon Sep 17 00:00:00 2001 From: tetsuya-ki <64536338+tetsuya-ki@users.noreply.github.com> Date: Sun, 5 Jan 2025 18:49:24 +0900 Subject: [PATCH] fix syuilo-issue #136 (#156) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - DMのときはDMで返信するよう変更 --- src/message.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/message.ts b/src/message.ts index 104ca18..a9ea364 100644 --- a/src/message.ts +++ b/src/message.ts @@ -83,13 +83,20 @@ export default class Message { await sleep(2000); } - return await this.ai.post({ + const postData = { replyId: this.note.id, text: text, fileIds: opts?.file ? [opts?.file.id] : undefined, cw: opts?.cw, renoteId: opts?.renote - }); + }; + + // DM以外は普通に返信し、DMの場合はDMで返信する + if (this.note.visibility != 'specified') { + return await this.ai.post(postData); + } else { + return await this.ai.sendMessage(this.userId, postData); + } } @bindThis