feat: Implement chat pagination, participant single page with mutations, and fix user link substitutions
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user