diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ad2eed..3a0402f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# Version 0.7.4 +Add a constraint into `slack:users:update` command which exclude `slackbot` from valid users. It appears that `slackbot` is not considered as a bot by Slack API. +We're waiting for a ticket issue response from Slack Team related to this bug. + # Version 0.7.3 Add a local channels clear which will delete no longer valid channels to the command `slack:channels:update` if there is an issue with the daemon. diff --git a/src/Commands/SlackUsersUpdate.php b/src/Commands/SlackUsersUpdate.php index 71633b4..0ee321e 100644 --- a/src/Commands/SlackUsersUpdate.php +++ b/src/Commands/SlackUsersUpdate.php @@ -40,7 +40,7 @@ public function handle() // iterate over each member, check if the user mail match with a seat account and update the relation table foreach ($members as $m) { - if ($m['deleted'] == false && $m['is_bot'] == false && + if ($m['id'] != 'USLACKBOT' && $m['deleted'] == false && $m['is_bot'] == false && !key_exists('api_app_id', $m['profile'])) { $user = User::where('email', '=', $m['profile']['email'])->first(); if ($user != null) { @@ -50,7 +50,7 @@ public function handle() $slackUser->user_id = $user->id; $slackUser->invited = true; } - + $slackUser->slack_id = $m['id']; $slackUser->save(); } diff --git a/src/Config/slackbot.config.php b/src/Config/slackbot.config.php index 755d5d7..d1d7e75 100644 --- a/src/Config/slackbot.config.php +++ b/src/Config/slackbot.config.php @@ -9,5 +9,5 @@ * TODO: lazy coder, remember to edit this file before TAG ! DAMMIT ! */ return [ - 'version' => '0.7.3' + 'version' => '0.7.4' ];