perf: 临时帐号别名

This commit is contained in:
kuaifan
2024-04-08 16:53:24 +08:00
parent 654a90626e
commit a03050bc7b
5 changed files with 28 additions and 5 deletions
@@ -2,6 +2,7 @@
use App\Models\User;
use App\Models\WebSocketDialog;
use App\Models\WebSocketDialogUser;
use Carbon\Carbon;
use Illuminate\Database\Migrations\Migration;
@@ -19,8 +20,7 @@ class GenerateWebSocketDialogsDefaultGroup extends Migration
if ($botUser) {
$dialog = WebSocketDialog::checkUserDialog($botUser, 1);
if ($dialog) {
$dialog->last_at = Carbon::now();
$dialog->save();
WebSocketDialogUser::whereDialogId($dialog->id)->update(['last_at' => Carbon::now()]);
}
}