From caecadd655a149d52d70b4520bcb76484f43430f Mon Sep 17 00:00:00 2001 From: rb-cohen Date: Fri, 27 Nov 2015 10:03:31 +0000 Subject: [PATCH] Update ApiClient.php The ID of the DMChannel is contained within $response['channel']['id'] not $response['channel'] I think. --- src/ApiClient.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ApiClient.php b/src/ApiClient.php index 3c97359..33a9108 100644 --- a/src/ApiClient.php +++ b/src/ApiClient.php @@ -269,7 +269,7 @@ public function getDMByUserId($id) return $this->apiCall('im.open', [ 'user' => $id, ])->then(function (Payload $response) { - return $this->getDMById($response['channel']); + return $this->getDMById($response['channel']['id']); }); }