From d5639016221099c9e08e54c0004fd89c38a98e16 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 2 May 2023 20:11:26 -0600 Subject: [PATCH 1/3] Update ApiV1Controller --- app/Http/Controllers/Api/ApiV1Controller.php | 3 ++- app/Http/Controllers/ComposeController.php | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) 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(); From 670b3ba868f7935c755603bb6e72e07d30e0f18f Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 2 May 2023 20:53:10 -0600 Subject: [PATCH 2/3] Update passport config --- config/passport.php | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) 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'), + ], + ]; From 79b6a17e440f901a7718317a09abd77a3f08d5fa Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 2 May 2023 20:55:45 -0600 Subject: [PATCH 3/3] Add postgres migration --- ..._visibility_defaults_on_statuses_table.php | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 database/migrations/2023_05_03_023758_update_postgres_visibility_defaults_on_statuses_table.php 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 @@ +