Repair: copy legacy joinDate into new user's created_at when creating users from legacy wallz

This commit is contained in:
2026-03-22 09:13:39 +01:00
parent e8b5edf5d2
commit 2608be7420
80 changed files with 3991 additions and 723 deletions

View File

@@ -490,6 +490,10 @@ Route::middleware(['web', 'auth', 'normalize.username', 'throttle:60,1'])
->prefix('messages')
->name('api.messages.')
->group(function () {
Route::post('presence/heartbeat', [\App\Http\Controllers\Api\Messaging\PresenceController::class, 'heartbeat'])
->middleware('throttle:messages-presence')
->name('presence.heartbeat');
Route::get('settings', [\App\Http\Controllers\Api\Messaging\MessagingSettingsController::class, 'show'])->name('settings.show');
Route::patch('settings', [\App\Http\Controllers\Api\Messaging\MessagingSettingsController::class, 'update'])->name('settings.update');
@@ -497,7 +501,7 @@ Route::middleware(['web', 'auth', 'normalize.username', 'throttle:60,1'])
Route::post('conversation', [\App\Http\Controllers\Api\Messaging\ConversationController::class, 'store'])->middleware('throttle:messages-send')->name('conversations.store');
Route::get('conversation/{id}', [\App\Http\Controllers\Api\Messaging\ConversationController::class, 'show'])->whereNumber('id')->name('conversations.show');
Route::post('{conversation_id}/read', [\App\Http\Controllers\Api\Messaging\ConversationController::class, 'markRead'])->whereNumber('conversation_id')->name('read');
Route::post('{conversation_id}/read', [\App\Http\Controllers\Api\Messaging\ConversationController::class, 'markRead'])->middleware('throttle:messages-read')->whereNumber('conversation_id')->name('read');
Route::post('{conversation_id}/archive', [\App\Http\Controllers\Api\Messaging\ConversationController::class, 'archive'])->whereNumber('conversation_id')->name('archive');
Route::post('{conversation_id}/mute', [\App\Http\Controllers\Api\Messaging\ConversationController::class, 'mute'])->whereNumber('conversation_id')->name('mute');
Route::post('{conversation_id}/pin', [\App\Http\Controllers\Api\Messaging\ConversationController::class, 'pin'])->whereNumber('conversation_id')->name('pin');
@@ -510,12 +514,13 @@ Route::middleware(['web', 'auth', 'normalize.username', 'throttle:60,1'])
Route::get('search', [\App\Http\Controllers\Api\Messaging\MessageSearchController::class, 'index'])->name('search.index');
Route::post('search/rebuild', [\App\Http\Controllers\Api\Messaging\MessageSearchController::class, 'rebuild'])->name('search.rebuild');
Route::get('{conversation_id}/delta', [\App\Http\Controllers\Api\Messaging\MessageController::class, 'delta'])->middleware('throttle:messages-recovery')->whereNumber('conversation_id')->name('messages.delta');
Route::get('{conversation_id}', [\App\Http\Controllers\Api\Messaging\MessageController::class, 'index'])->whereNumber('conversation_id')->name('messages.index');
Route::post('{conversation_id}', [\App\Http\Controllers\Api\Messaging\MessageController::class, 'store'])->middleware('throttle:messages-send')->whereNumber('conversation_id')->name('messages.store');
Route::post('{conversation_id}/typing', [\App\Http\Controllers\Api\Messaging\TypingController::class, 'start'])->whereNumber('conversation_id')->name('typing.start');
Route::post('{conversation_id}/typing/stop', [\App\Http\Controllers\Api\Messaging\TypingController::class, 'stop'])->whereNumber('conversation_id')->name('typing.stop');
Route::get('{conversation_id}/typing', [\App\Http\Controllers\Api\Messaging\TypingController::class, 'index'])->whereNumber('conversation_id')->name('typing.index');
Route::post('{conversation_id}/typing', [\App\Http\Controllers\Api\Messaging\TypingController::class, 'start'])->middleware('throttle:messages-typing')->whereNumber('conversation_id')->name('typing.start');
Route::post('{conversation_id}/typing/stop', [\App\Http\Controllers\Api\Messaging\TypingController::class, 'stop'])->middleware('throttle:messages-typing')->whereNumber('conversation_id')->name('typing.stop');
Route::get('{conversation_id}/typing', [\App\Http\Controllers\Api\Messaging\TypingController::class, 'index'])->middleware('throttle:messages-typing')->whereNumber('conversation_id')->name('typing.index');
Route::post('{conversation_id}/{message_id}/react', [\App\Http\Controllers\Api\Messaging\MessageController::class, 'react'])->whereNumber(['conversation_id', 'message_id'])->name('react');
Route::delete('{conversation_id}/{message_id}/react', [\App\Http\Controllers\Api\Messaging\MessageController::class, 'unreact'])->whereNumber(['conversation_id', 'message_id'])->name('unreact');

View File

@@ -2,6 +2,7 @@
use App\Models\Conversation;
use App\Policies\ConversationPolicy;
use App\Services\Messaging\MessagingPayloadFactory;
use Illuminate\Support\Facades\Broadcast;
Broadcast::channel('App.Models.User.{id}', function ($user, $id) {
@@ -43,10 +44,9 @@ Broadcast::channel('presence-conversation.{conversationId}', function ($user, $c
return false;
}
return [
'id' => (int) $user->id,
'username' => (string) $user->username,
'display_name' => (string) ($user->name ?: $user->username),
'avatar_thumb_url' => null,
];
return app(MessagingPayloadFactory::class)->presenceUser($user);
});
Broadcast::channel('presence-messaging', function ($user) {
return app(MessagingPayloadFactory::class)->presenceUser($user);
});

View File

@@ -133,3 +133,8 @@ Schedule::command('forum:firewall-scan')
->name('forum-firewall-scan')
->withoutOverlapping()
->runInBackground();
Schedule::command('horizon:snapshot')
->everyFiveMinutes()
->name('horizon-snapshot')
->withoutOverlapping();

View File

@@ -236,6 +236,11 @@ Route::get('/@{username}/gallery', [ProfileController::class, 'showGalleryByUser
->where('username', '[A-Za-z0-9_-]{3,20}')
->name('profile.gallery');
Route::get('/@{username}/{tab}', [ProfileController::class, 'showTabByUsername'])
->where('username', '[A-Za-z0-9_-]{3,20}')
->where('tab', 'posts|artworks|stories|achievements|collections|about|stats|favourites|activity')
->name('profile.tab');
Route::get('/@{username}', [ProfileController::class, 'showByUsername'])
->where('username', '[A-Za-z0-9_-]{3,20}')
->name('profile.show');