Merge pull request #5862 from pixelfed/staging

Update DM config, allow new users to send DMs by default, with a new …
pull/5871/head
daniel 6 months ago committed by GitHub
commit d05f0e1c99
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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),
];

Loading…
Cancel
Save