Skip to content

Commit

Permalink
Fix RTM api issue when detecting bot IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
mpociot committed Oct 1, 2017
1 parent 42df8a6 commit 3da89f8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/SlackRTMDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ public function connected()
{
$this->client->getAuthedUser()->then(function ($user) {
$this->botUserID = $user->getId();
if (isset($user->data['is_bot']) && $user->data['is_bot']) {
$this->bot_id = $user->data['profile']['bot_id'];
$data = $user->getRawUser();
if (isset($data['is_bot']) && $data['is_bot']) {
$this->bot_id = $data['profile']['bot_id'];
}
});
}
Expand Down

0 comments on commit 3da89f8

Please sign in to comment.