Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The old slack `access_token` stopped working and prevented the update of the users' `is_superuser` flag. This fixes the problem. Context/Technicalities ====================== The old Slack application' `access_token` stopped working causing the Control Panel to raise the following error: ``` {'ok': False, 'error': 'account_inactive'} ``` This may have been caused by the person setting up the corresponding app being deactivated in Slack (because they left). We tried to tweak the old app - required some approval - but we couldn't make it work. I've now created a new application in Slack but when testing its new `access_token` I was getting another error: ``` {'ok': False, 'error': 'invalid_arguments', 'deprecated_argument': 'as_user'} ``` This is caused by the change in new Slack Applications behaviour. According to [Slack's `chat.postMessage` documentation](https://api.slack.com/methods/chat.postMessage#authorship): > The `as_user` parameter may not be used by new Slack apps (i.e., apps > installed using our V2 of Oauth 2.0). New Slack apps act on their own > behalf, rather than a user's. Remove the `as_user` argument worked but the `user` argument was completely ignored (again, because of the change in behaviour above). This is the reason why I've moved the environment name at the end of the message - as we still want to distinguish between `dev` and `alpha` messages to avoid confusion. Ticket ====== Part of ticket: https://trello.com/c/GrJPGKxm
- Loading branch information