1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-22 07:42:41 +00:00

Update ApiV1Dot1Controller, allow upto 5 similar push tokens

This commit is contained in:
Daniel Supernault 2024-10-08 02:26:01 -06:00
parent 989a8e9328
commit 7820b506d8
No known key found for this signature in database
GPG key ID: 23740873EE6F76A1

View file

@ -1139,7 +1139,7 @@ class ApiV1Dot1Controller extends Controller
$expoToken = $request->input('token');
$existing = User::where('profile_id', '!=', $pid)->whereExpoToken($expoToken)->count();
abort_if($existing, 400, 'Push token is already used by another account');
abort_if($existing && $existing > 5, 400, 'Push token is already used by another account');
$request->user()->update([
'notify_enabled' => $request->boolean('notify_enabled'),