perf: 添加定位签到

This commit is contained in:
kuaifan
2024-11-09 09:16:00 +08:00
parent 13fb884387
commit e5df3e6746
5 changed files with 56 additions and 23 deletions

View File

@@ -63,6 +63,22 @@ class BotReceiveMsgTask extends AbstractTask
*/
private function botManagerReceive(WebSocketDialogMsg $msg, User $botUser)
{
// 位置消息
if ($msg->type === 'location') {
// 签到机器人
if ($botUser->email === 'check-in@bot.system') {
$content = UserBot::checkinBotQuickMsg('locat-checkin', $msg->userid, $msg->msg);
if ($content) {
WebSocketDialogMsg::sendMsg(null, $msg->dialog_id, 'template', [
'type' => 'content',
'content' => $content,
], $botUser->userid, false, false, true); // todo 未能在任务end事件来发送任务
}
}
return;
}
// 文本消息
if ($msg->type !== 'text') {
return;
}