feat: Implement chat pagination, participant single page with mutations, and fix user link substitutions

This commit is contained in:
Daan Meijer
2026-06-17 22:55:11 +02:00
parent 11df4ef55c
commit ed16d5dcda
12 changed files with 268 additions and 43 deletions
+9 -1
View File
@@ -64,7 +64,7 @@ class LedgerController extends Controller
$activityService->updateCursor($request->user(), $ledger);
$dynamic->load(['chat', 'participants' => fn($query) => $query->withPivot('display_name')]);
$dynamic->load('chat', 'participants');
$ledger->load([
'media',
@@ -91,9 +91,17 @@ class LedgerController extends Controller
'dynamic' => $dynamic,
'ledger' => $ledger,
'isOwner' => $isOwner,
'messages' => $dynamic->chat->messages()->with(['user', 'media'])->latest()->paginate(20),
]);
}
public function messages(Request $request, Dynamic $dynamic, Ledger $ledger)
{
$this->authorize('view', $ledger);
return $dynamic->chat->messages()->with(['user', 'media'])->latest()->paginate(20);
}
/**
* Show the form for editing the specified resource.
*/