forked from mirror/pixelfed
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\FollowPipeline\FollowPipeline;
|
||||
|
||||
use App\Util\ActivityPub\Validator\{
|
||||
Accept,
|
||||
Follow
|
||||
};
|
||||
use App\Util\ActivityPub\Validator\Accept as AcceptValidator;
|
||||
use App\Util\ActivityPub\Validator\Announce as AnnounceValidator;
|
||||
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
|
||||
{
|
||||
|
@ -65,11 +66,12 @@ class Inbox
|
|||
break;
|
||||
|
||||
case 'Announce':
|
||||
if(AnnounceValidator::validate($this->payload) == false) { return; }
|
||||
$this->handleAnnounceActivity();
|
||||
break;
|
||||
|
||||
case 'Accept':
|
||||
if(Accept::validate($this->payload) == false) { return; }
|
||||
if(AcceptValidator::validate($this->payload) == false) { return; }
|
||||
$this->handleAcceptActivity();
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in a new issue