mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-26 22:40:45 +00:00
Update Inbox, add more validators
This commit is contained in:
parent
5c5931200b
commit
f3ed2462a7
1 changed files with 7 additions and 5 deletions
|
@ -18,10 +18,11 @@ use App\Util\ActivityPub\Helpers;
|
||||||
use App\Jobs\LikePipeline\LikePipeline;
|
use App\Jobs\LikePipeline\LikePipeline;
|
||||||
use App\Jobs\FollowPipeline\FollowPipeline;
|
use App\Jobs\FollowPipeline\FollowPipeline;
|
||||||
|
|
||||||
use App\Util\ActivityPub\Validator\{
|
use App\Util\ActivityPub\Validator\Accept as AcceptValidator;
|
||||||
Accept,
|
use App\Util\ActivityPub\Validator\Announce as AnnounceValidator;
|
||||||
Follow
|
use App\Util\ActivityPub\Validator\Follow as FollowValidator;
|
||||||
};
|
use App\Util\ActivityPub\Validator\Like as LikeValidator;
|
||||||
|
use App\Util\ActivityPub\Validator\UndoFollow as UndoFollowValidator;
|
||||||
|
|
||||||
class Inbox
|
class Inbox
|
||||||
{
|
{
|
||||||
|
@ -65,11 +66,12 @@ class Inbox
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'Announce':
|
case 'Announce':
|
||||||
|
if(AnnounceValidator::validate($this->payload) == false) { return; }
|
||||||
$this->handleAnnounceActivity();
|
$this->handleAnnounceActivity();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'Accept':
|
case 'Accept':
|
||||||
if(Accept::validate($this->payload) == false) { return; }
|
if(AcceptValidator::validate($this->payload) == false) { return; }
|
||||||
$this->handleAcceptActivity();
|
$this->handleAcceptActivity();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue