diff --git a/app/Util/ActivityPub/Inbox.php b/app/Util/ActivityPub/Inbox.php index e98b48c49..ddd377a70 100644 --- a/app/Util/ActivityPub/Inbox.php +++ b/app/Util/ActivityPub/Inbox.php @@ -645,6 +645,7 @@ class Inbox 'profile_id' => $actor->id, 'reblog_of_id' => $parent->id, 'type' => 'share', + 'local' => false, ]); Notification::firstOrCreate( diff --git a/database/migrations/2025_01_18_061532_fix_local_statuses.php b/database/migrations/2025_01_18_061532_fix_local_statuses.php new file mode 100644 index 000000000..f17eeaa0f --- /dev/null +++ b/database/migrations/2025_01_18_061532_fix_local_statuses.php @@ -0,0 +1,31 @@ +where('local', true) + ->where('type', 'share') + ->whereHas('profile', function($query) { + $query->whereDoesntHave('user'); + }) + ->chunkById(100, function($statuses) { + foreach($statuses as $status) { + $status->local = false; + $status->save(); + } + }); + } + + public function down(): void + { + // No down migration needed since this is a data fix + } +};