diff --git a/app/Http/Controllers/Api/ApiV1Controller.php b/app/Http/Controllers/Api/ApiV1Controller.php index 2ca98210d..b9011e595 100644 --- a/app/Http/Controllers/Api/ApiV1Controller.php +++ b/app/Http/Controllers/Api/ApiV1Controller.php @@ -3010,9 +3010,10 @@ class ApiV1Controller extends Controller $status->caption = $content; $status->rendered = $rendered; $status->profile_id = $user->profile_id; - $status->scope = 'draft'; $status->is_nsfw = $cw; $status->cw_summary = $spoilerText; + $status->scope = 'draft'; + $status->visibility = 'draft'; if($request->has('place_id')) { $status->place_id = $request->input('place_id'); } diff --git a/app/Http/Controllers/ComposeController.php b/app/Http/Controllers/ComposeController.php index 441223679..16192682c 100644 --- a/app/Http/Controllers/ComposeController.php +++ b/app/Http/Controllers/ComposeController.php @@ -561,6 +561,7 @@ class ComposeController extends Controller $status->caption = strip_tags($request->caption); $status->rendered = Autolink::create()->autolink($status->caption); $status->scope = 'draft'; + $status->visibility = 'draft'; $status->profile_id = $profile->id; $status->save(); diff --git a/config/passport.php b/config/passport.php index a4565f372..bd7e2ee9b 100644 --- a/config/passport.php +++ b/config/passport.php @@ -1,6 +1,18 @@ 'web', /* |-------------------------------------------------------------------------- @@ -17,4 +29,33 @@ return [ 'public_key' => env('PASSPORT_PUBLIC_KEY'), + /* + |-------------------------------------------------------------------------- + | Client UUIDs + |-------------------------------------------------------------------------- + | + | By default, Passport uses auto-incrementing primary keys when assigning + | IDs to clients. However, if Passport is installed using the provided + | --uuids switch, this will be set to "true" and UUIDs will be used. + | + */ + + 'client_uuids' => false, + + /* + |-------------------------------------------------------------------------- + | Personal Access Client + |-------------------------------------------------------------------------- + | + | If you enable client hashing, you should set the personal access client + | ID and unhashed secret within your environment file. The values will + | get used while issuing fresh personal access tokens to your users. + | + */ + + 'personal_access_client' => [ + 'id' => env('PASSPORT_PERSONAL_ACCESS_CLIENT_ID'), + 'secret' => env('PASSPORT_PERSONAL_ACCESS_CLIENT_SECRET'), + ], + ]; diff --git a/database/migrations/2023_05_03_023758_update_postgres_visibility_defaults_on_statuses_table.php b/database/migrations/2023_05_03_023758_update_postgres_visibility_defaults_on_statuses_table.php new file mode 100644 index 000000000..f4b6eeda3 --- /dev/null +++ b/database/migrations/2023_05_03_023758_update_postgres_visibility_defaults_on_statuses_table.php @@ -0,0 +1,36 @@ +