feat: 优化用户机器人 webhook 逻辑

This commit is contained in:
nightcp
2025-10-21 13:53:16 +08:00
parent 9b2731607b
commit 98e4668969
5 changed files with 21 additions and 12 deletions

View File

@@ -138,11 +138,11 @@ class WebSocketDialogMsgTask extends AbstractTask
'dot' => $dot,
'updated' => $updated,
];
// 机器人收到消处理
$botUser = User::whereUserid($userid)->whereBot(1)->first();
if ($botUser) {
$this->endArray[] = new BotReceiveMsgTask($botUser->userid, $msg->id, $mentions, $this->client);
}
}
// 机器人收到消处理
$botUser = User::whereUserid($userid)->whereBot(1)->first();
if ($botUser) { // 避免机器人处理自己发送的消息
$this->endArray[] = new BotReceiveMsgTask($botUser->userid, $msg->id, $mentions, $this->client);
}
}
// 更新已发送数量