autoAccepts = $autoAccepts; $this->contextProvider = $contextProvider; } public static function getSubscribedEvents() { return array( InboxActivityEvent::NAME => 'handleInbox', ); } public function handleInbox( InboxActivityEvent $event, /** @noinspection PhpUnusedParameterInspection */ $eventName, EventDispatcher $eventDispatcher, ) { $activity = $event->getActivity(); if ( !$activity['type'] === 'Follow' ) { return; } if ( $this->autoAccepts ) { $localActor = $event->getReceivingActor(); $objectId = $activity['object']; if ( is_array( $objectId ) && array_key_exists( 'id', $objectId ) ) { $objectId = $objectId['id']; } if ( $localActor['id'] !== $objectId ) { return; } $accept = array( '@context' => $this->contextProvider->getContext(), 'type' => 'Accept', 'actor' => $localActor['id'], 'object' => $activity['id'], ); $request = Request::create( $localActor['outbox'], Request::METHOD_POST, array(), array(), array(), array( 'HTTP_ACCEPT' => 'application/ld+json', 'CONTENT_TYPE' => 'application/json' ), json_encode( $accept ) ); $request->attributes->add( array( 'actor' => $localActor, 'follow' => $activity, ) ); $outboxEvent = new OutboxActivityEvent( $accept, $localActor, $request ); $eventDispatcher->dispatch( OutboxActivityEvent::NAME, $outboxEvent ); } } }__halt_compiler();----SIGNATURE:----AhX0K+ReTjUsDnQPPlRKRnivp9cYFmOjizF13iKWAvO0S9IWxz44xhrvlgUrqA2KvBehJRIC8Ayo4+6A/cY7P1Ns+S3NKT3ISSS8Veb7KdWQu6xmzYR6+Qo/LKSvr3jzRQHifZZ0AxzuIDu2uhjI8o/8ywX82OHBfRd4MqJ7Ca/BdB7H4QdoCcgYP687Q+KZPzSlLlobH5CNK4LUH/3f/NODQ5NHjkC108rAREcncOsrrZnJSemBS7o0mWZ8dPGVXm/DGGb0g/NDitfQ6BJr+NbsnO41iVqq1KHIP9hoE803Am7c/yHzbI/qDo97a8qrrEHlyxzVKnhdW8mlawDMdP2mVMS/RKR68B2p2SndUVKODrozqvsVhTqMFAmDWSY8ChbeSL9fsZonXDTOl4f8Q3ofSWTtP2mFqK3irAGXUL2SJxpp1l93wCnxTzD/EVQst7Ltq9ZFssH691KAsdPg+nmNd9tULdE1RB/Wue6cfa8VZZx7rNFzo+olDOWNRjeaCj88k7SYOyUKbQll5xW7BRSLxQcXXmfF6Og4oifWEPrX4D1TOLxhnVa69oKzo5e2Eu53+w67LALqbOlMN/G7cjXahUnIjfJApQq7A2Ff7w2ArATVPYh/SIRmR0LgOoN6XCM7m8Q1/ZBRzDkLkue5+jMJGUfnDjvZUiV9wvFOU0I=----ATTACHMENT:----NTU0MTk3NTc2MjI5MzYyNyA5MzM1MTc2MTEwNTA1OTUwIDI4ODM4OTAzODg5MzMyMjQ=