mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-17 20:11:27 +00:00
Fix typos
This commit is contained in:
parent
286779247e
commit
b37f8067e5
1 changed files with 12 additions and 3 deletions
|
@ -108,13 +108,22 @@ class MoveMigrateFollowersPipeline implements ShouldQueue
|
||||||
->where('followers.following_id', $actorAccount['id'])
|
->where('followers.following_id', $actorAccount['id'])
|
||||||
->whereNotNull('profiles.user_id')
|
->whereNotNull('profiles.user_id')
|
||||||
->whereNull('profiles.deleted_at')
|
->whereNull('profiles.deleted_at')
|
||||||
->select('profiles.id', 'profiles.user_id', 'profiles.username', 'profiles.private_key')
|
->select('profiles.id', 'profiles.user_id', 'profiles.username', 'profiles.private_key', 'profiles.status')
|
||||||
->chunkById(100, function ($followers) use ($activity, $addlHeaders, $targetInbox, $targetPid) {
|
->chunkById(100, function ($followers) use ($addlHeaders, $targetInbox, $targetPid, $target) {
|
||||||
$client = new Client([
|
$client = new Client([
|
||||||
'timeout' => config('federation.activitypub.delivery.timeout'),
|
'timeout' => config('federation.activitypub.delivery.timeout'),
|
||||||
]);
|
]);
|
||||||
$requests = function ($followers) use ($client, $activity, $addlHeaders, $targetInbox, $targetPid) {
|
$requests = function ($followers) use ($client, $target, $addlHeaders, $targetInbox, $targetPid) {
|
||||||
|
$activity = [
|
||||||
|
'@context' => 'https://www.w3.org/ns/activitystreams',
|
||||||
|
'type' => 'Follow',
|
||||||
|
'actor' => null,
|
||||||
|
'object' => $target,
|
||||||
|
];
|
||||||
foreach ($followers as $follower) {
|
foreach ($followers as $follower) {
|
||||||
|
if (! $follower->private_key || ! $follower->username || ! $follower->user_id || $follower->status === 'delete') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$permalink = 'https://'.config('pixelfed.domain.app').'/users/'.$follower->username;
|
$permalink = 'https://'.config('pixelfed.domain.app').'/users/'.$follower->username;
|
||||||
$activity['actor'] = $permalink;
|
$activity['actor'] = $permalink;
|
||||||
$keyId = $permalink.'#main-key';
|
$keyId = $permalink.'#main-key';
|
||||||
|
|
Loading…
Reference in a new issue