From a91a5e48721e22993823e377044189df411f58cb Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 13 May 2023 06:28:17 -0600 Subject: [PATCH 1/2] Update StatusEntityLexer, stop saving entities --- app/Http/Controllers/ComposeController.php | 2 +- app/Jobs/StatusPipeline/StatusEntityLexer.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Http/Controllers/ComposeController.php b/app/Http/Controllers/ComposeController.php index 16192682c..7a3614f3d 100644 --- a/app/Http/Controllers/ComposeController.php +++ b/app/Http/Controllers/ComposeController.php @@ -673,7 +673,7 @@ class ComposeController extends Controller $status->caption = strip_tags($request->caption); $status->profile_id = $profile->id; - $entities = Extractor::create()->extract($status->caption); + $entities = []; $visibility = $profile->unlisted == true && $visibility == 'public' ? 'unlisted' : $visibility; $cw = $profile->cw == true ? true : $cw; $status->is_nsfw = $cw; diff --git a/app/Jobs/StatusPipeline/StatusEntityLexer.php b/app/Jobs/StatusPipeline/StatusEntityLexer.php index 1ee57c559..d205f1e21 100644 --- a/app/Jobs/StatusPipeline/StatusEntityLexer.php +++ b/app/Jobs/StatusPipeline/StatusEntityLexer.php @@ -89,7 +89,6 @@ class StatusEntityLexer implements ShouldQueue DB::transaction(function () { $status = $this->status; $status->rendered = nl2br($this->autolink); - $status->entities = json_encode($this->entities); $status->save(); }); } From 95f118b2dc6f281890048e7142d40653750b1097 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 13 May 2023 07:01:26 -0600 Subject: [PATCH 2/2] Add migration --- ...nused_columns_from_notifications_table.php | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 database/migrations/2023_05_13_045228_remove_unused_columns_from_notifications_table.php diff --git a/database/migrations/2023_05_13_045228_remove_unused_columns_from_notifications_table.php b/database/migrations/2023_05_13_045228_remove_unused_columns_from_notifications_table.php new file mode 100644 index 000000000..1c450f920 --- /dev/null +++ b/database/migrations/2023_05_13_045228_remove_unused_columns_from_notifications_table.php @@ -0,0 +1,31 @@ +dropColumn('message'); + } + + if(Schema::hasColumn('notifications', 'rendered')) { + $table->dropColumn('rendered'); + } + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + } +};