mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-10 00:34:50 +00:00
Update Move pipeline, add debug logging
This commit is contained in:
parent
0cba7d7d7d
commit
5558535aea
2 changed files with 7 additions and 2 deletions
|
@ -9,6 +9,7 @@ use Illuminate\Foundation\Queue\Queueable;
|
|||
use Illuminate\Queue\Middleware\ThrottlesExceptions;
|
||||
use Illuminate\Queue\Middleware\WithoutOverlapping;
|
||||
use DateTime;
|
||||
use Log;
|
||||
|
||||
class ProcessMovePipeline implements ShouldQueue
|
||||
{
|
||||
|
@ -86,11 +87,13 @@ class ProcessMovePipeline implements ShouldQueue
|
|||
$res = ActivityPubFetchService::fetchRequest($this->target, true);
|
||||
|
||||
if (! $res || ! isset($res['alsoKnownAs'])) {
|
||||
Log::info('[AP][INBOX][MOVE] target_aka failure');
|
||||
return false;
|
||||
}
|
||||
|
||||
$res = Helpers::profileFetch($this->target);
|
||||
if (! $res) {
|
||||
Log::info('[AP][INBOX][MOVE] target fetch failure');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -112,11 +115,13 @@ class ProcessMovePipeline implements ShouldQueue
|
|||
$res = ActivityPubFetchService::fetchRequest($this->actor, true);
|
||||
|
||||
if (! $res || ! isset($res['movedTo'])) {
|
||||
Log::info('[AP][INBOX][MOVE] actor_movedTo failure');
|
||||
return false;
|
||||
}
|
||||
|
||||
$res = Helpers::profileFetch($this->actor);
|
||||
if (! $res) {
|
||||
Log::info('[AP][INBOX][MOVE] actor fetch failure');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -145,7 +145,6 @@ class Inbox
|
|||
case 'Move':
|
||||
if (MoveValidator::validate($this->payload) == false) {
|
||||
\Log::info('[AP][INBOX][MOVE] VALIDATE_FAILURE '.json_encode($this->payload));
|
||||
|
||||
return;
|
||||
}
|
||||
$this->handleMoveActivity();
|
||||
|
@ -1367,6 +1366,7 @@ class Inbox
|
|||
! Helpers::validateUrl($activity) ||
|
||||
! Helpers::validateUrl($target)
|
||||
) {
|
||||
\Log::info('[AP][INBOX][MOVE] validateUrl fail');
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1375,6 +1375,6 @@ class Inbox
|
|||
new MoveMigrateFollowersPipeline($target, $activity),
|
||||
new UnfollowLegacyAccountMovePipeline($target, $activity),
|
||||
new CleanupLegacyAccountMovePipeline($target, $activity),
|
||||
])->onQueue('move')->dispatch();
|
||||
])->onQueue('move')->dispatchSync();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue