mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-24 14:03:16 +00:00
commit
5a8e0ab5df
3 changed files with 32 additions and 2 deletions
|
@ -673,7 +673,7 @@ class ComposeController extends Controller
|
||||||
|
|
||||||
$status->caption = strip_tags($request->caption);
|
$status->caption = strip_tags($request->caption);
|
||||||
$status->profile_id = $profile->id;
|
$status->profile_id = $profile->id;
|
||||||
$entities = Extractor::create()->extract($status->caption);
|
$entities = [];
|
||||||
$visibility = $profile->unlisted == true && $visibility == 'public' ? 'unlisted' : $visibility;
|
$visibility = $profile->unlisted == true && $visibility == 'public' ? 'unlisted' : $visibility;
|
||||||
$cw = $profile->cw == true ? true : $cw;
|
$cw = $profile->cw == true ? true : $cw;
|
||||||
$status->is_nsfw = $cw;
|
$status->is_nsfw = $cw;
|
||||||
|
|
|
@ -89,7 +89,6 @@ class StatusEntityLexer implements ShouldQueue
|
||||||
DB::transaction(function () {
|
DB::transaction(function () {
|
||||||
$status = $this->status;
|
$status = $this->status;
|
||||||
$status->rendered = nl2br($this->autolink);
|
$status->rendered = nl2br($this->autolink);
|
||||||
$status->entities = json_encode($this->entities);
|
|
||||||
$status->save();
|
$status->save();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('notifications', function (Blueprint $table) {
|
||||||
|
if(Schema::hasColumn('notifications', 'message')) {
|
||||||
|
$table->dropColumn('message');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(Schema::hasColumn('notifications', 'rendered')) {
|
||||||
|
$table->dropColumn('rendered');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
}
|
||||||
|
};
|
Loading…
Reference in a new issue