mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-17 20:11:27 +00:00
Merge pull request #5324 from pixelfed/staging
Update ApiV1Dot1Controller, allow upto 5 similar push tokens
This commit is contained in:
commit
b3bd941c82
1 changed files with 1 additions and 1 deletions
|
@ -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'),
|
||||
|
|
Loading…
Reference in a new issue