mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-21 23:32:39 +00:00
Update DirectMessageController, remove 72h limit for admins
This commit is contained in:
parent
8cd01b2ede
commit
639df41093
1 changed files with 3 additions and 1 deletions
|
@ -307,7 +307,9 @@ class DirectMessageController extends Controller
|
|||
|
||||
$user = $request->user();
|
||||
abort_if($user->has_roles && ! UserRoleService::can('can-direct-message', $user->id), 403, 'Invalid permissions for this action');
|
||||
abort_if($user->created_at->gt(now()->subHours(72)), 400, 'You need to wait a bit before you can DM another account');
|
||||
if (! $user->is_admin) {
|
||||
abort_if($user->created_at->gt(now()->subHours(72)), 400, 'You need to wait a bit before you can DM another account');
|
||||
}
|
||||
$profile = $user->profile;
|
||||
$recipient = Profile::where('id', '!=', $profile->id)->findOrFail($request->input('to_id'));
|
||||
|
||||
|
|
Loading…
Reference in a new issue