src/Command/LinkShared.php
public function execute(array $data): JsonResponse
    {
        $this->debug('link_shared', ['event' => $data]);

        /** @var UnfurlEvent $event */
        $event = $this->dispatcher->dispatch(Events::SLACK_UNFURL, new UnfurlEvent($data));
        $unfurls = $event->getUnfurls();

        $this->debug('unfurls', ['channel' => $data['channel'], 'ts' => $data['message_ts'], 'unfurls' => $unfurls]);
        if ($unfurls) {
            $this->slackClient->unfurl($data['channel'], $data['message_ts'], $unfurls);
        }

        return new JsonResponse([]);
    }
public function execute(array $data): JsonResponse
    {
        $this->debug('link_shared', ['event' => $data]);

        /** @var UnfurlEvent $event */
        $event = $this->dispatcher->dispatch(Events::SLACK_UNFURL, new UnfurlEvent($data));
        $unfurls = $event->getUnfurls();

        $this->debug('unfurls', ['channel' => $data['channel'], 'ts' => $data['message_ts'], 'unfurls' => $unfurls]);
        if ($unfurls) {
            $this->slackClient->unfurl($data['channel'], $data['message_ts'], $unfurls);
        }

        return new JsonResponse([]);
    }
public function execute ( array $ data ) : JsonResponse { $ this -> debug ( 'link_shared' , [ 'event' => $ data ] ) ; /** @var UnfurlEvent $event */ $ event = $ this -> dispatcher -> dispatch ( Events :: SLACK_UNFURL , new UnfurlEvent ( $ data ) ) ; $ unfurls = $ event -> getUnfurls ( ) ; $ this -> debug ( 'unfurls' , [ 'channel' => $ data [ 'channel' ] , 'ts' => $ data [ 'message_ts' ] , 'unfurls' => $ unfurls ] ) ; if ( $ unfurls ) { $ this -> slackClient -> unfurl ( $ data [ 'channel' ] , $ data [ 'message_ts' ] , $ unfurls ) ; } return new JsonResponse ( [ ] ) ; }
Handle Link Shared event
@param array $data
@return JsonResponse
@see https://api.slack.com/events/link_shared
Handle Link Shared event