Merge pull request #3237 from pixelfed/staging

Staging
This commit is contained in:
daniel 2022-02-13 02:16:09 -07:00 committed by GitHub
commit fb0298f808
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 35 additions and 0 deletions

View file

@ -46,6 +46,7 @@
- Updated StatusTagsPipeline, process federated hashtags and mentions ([a84b1736](https://github.com/pixelfed/pixelfed/commit/a84b1736))
- Updated Inbox, fix undo announce. ([cf286fb0](https://github.com/pixelfed/pixelfed/commit/cf286fb0))
- Updated ApiV1Controller, improve favourites endpoint. ([151dc17c](https://github.com/pixelfed/pixelfed/commit/151dc17c))
- Updated StatusController, set missing reblog/share type. ([548a12a4](https://github.com/pixelfed/pixelfed/commit/548a12a4))
- ([](https://github.com/pixelfed/pixelfed/commit/))
## [v0.11.2 (2022-01-09)](https://github.com/pixelfed/pixelfed/compare/v0.11.1...v0.11.2)

View file

@ -2247,6 +2247,7 @@ class ApiV1Controller extends Controller
$share = Status::firstOrCreate([
'profile_id' => $user->profile_id,
'reblog_of_id' => $status->id,
'type' => 'share',
'in_reply_to_profile_id' => $status->profile_id,
'scope' => 'public',
'visibility' => 'public'

View file

@ -254,6 +254,7 @@ class StatusController extends Controller
$share->profile_id = $profile->id;
$share->reblog_of_id = $status->id;
$share->in_reply_to_profile_id = $status->profile_id;
$share->type = 'share';
$share->save();
$count++;
SharePipeline::dispatch($share);

View file

@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use App\Status;
class AddMissingReblogOfIdTypesToStatusesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Status::whereNotNull('reblog_of_id')
->whereNull('type')
->update([
'type' => 'share'
]);
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
}
}