public function getPinnedMessages()
    {
        $deferred = new Deferred();

        $this->http->get($this->replaceWithVariables('channels/:id/pins'))->then(
            function ($response) use ($deferred) {
                $messages = new Collection();

                foreach ($response as $message) {
                    $message = $this->factory->create(Message::class, $message, true);
                    $messages->push($message);
                }

                $deferred->resolve($messages);
            },
            \React\Partial\bind_right($this->reject, $deferred)
        );

        return $deferred->promise();
    }