src/ApiClient.php
public function getDMByUserId($id)
    {
        return $this->apiCall('im.open', [
            'user' => $id,
        ])->then(function (Payload $response) {
            return $this->getDMById($response['channel']['id']);
        });
    }
public function getDMByUserId($id)
    {
        return $this->apiCall('im.open', [
            'user' => $id,
        ])->then(function (Payload $response) {
            return $this->getDMById($response['channel']['id']);
        });
    }
public function getDMByUserId ( $ id ) { return $ this -> apiCall ( 'im.open' , [ 'user' => $ id , ] ) -> then ( function ( Payload $ response ) { return $ this -> getDMById ( $ response [ 'channel' ] [ 'id' ] ) ; } ) ; }
Gets a direct message channel by user's ID.

@param string $id A user ID.

@return \React\Promise\PromiseInterface A promise for a DM object.
Gets a direct message channel by user s ID .