kopia lustrzana https://github.com/pixelfed/pixelfed
Merge pull request #5862 from pixelfed/staging
Update DM config, allow new users to send DMs by default, with a new …pull/5871/head
commit
d05f0e1c99
|
|
@ -54,6 +54,7 @@
|
|||
- Update AccountPostCountStatUpdate, fix memory leak ([134eb6324](https://github.com/pixelfed/pixelfed/commit/134eb6324))
|
||||
- Update snowflake config, allow custom datacenter/worker ids ([806e210f1](https://github.com/pixelfed/pixelfed/commit/806e210f1))
|
||||
- Update ApiV1Controller, return empty statuses feed for private accounts instead of 403 response ([cce657d9c](https://github.com/pixelfed/pixelfed/commit/cce657d9c))
|
||||
- Update DM config, allow new users to send DMs by default, with a new env variable to enforce a 72h limit ([717f17cde](https://github.com/pixelfed/pixelfed/commit/717f17cde))
|
||||
- ([](https://github.com/pixelfed/pixelfed/commit/))
|
||||
|
||||
## [v0.12.4 (2024-11-08)](https://github.com/pixelfed/pixelfed/compare/v0.12.4...dev)
|
||||
|
|
|
|||
|
|
@ -144,7 +144,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');
|
||||
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');
|
||||
if ((bool) ! config_cache('instance.allow_new_account_dms')) {
|
||||
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'));
|
||||
|
|
|
|||
|
|
@ -186,4 +186,6 @@ return [
|
|||
],
|
||||
|
||||
'show_peers' => env('INSTANCE_SHOW_PEERS', false),
|
||||
|
||||
'allow_new_account_dms' => env('INSTANCE_ALLOW_NEW_DMS', true),
|
||||
];
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue