Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Removes enforcement of "as_user" field. Fixes #1943 #1944

Merged
merged 2 commits into from
May 20, 2020
Merged

Removes enforcement of "as_user" field. Fixes #1943 #1944

merged 2 commits into from
May 20, 2020

Conversation

GaryTowers
Copy link
Contributor

Fixes issue #1943

By removing this IF statement:

New generation bots will be able to make use of icon_url, icon_emoji and username fields on the reply object without having Botkit forcing a deprecated field as_user set to false.

For classic bots, developers would still be able to add the as_user field manually as stated by the Slack documentation

(I'm not sure if I should make a PR to master or other branch, please advice)

@benbrown
Copy link
Contributor

This would break existing bots using this feature.

Please add a check for the new oauth_version configuration option - only exclude field if it is set to v2

@GaryTowers
Copy link
Contributor Author

Updated to fix issue #1943 based on oauth_version set to v2

The v2 check before removing the as_user field makes this backwards compatible with v1

Thanks for the observation @benbrown

@benbrown benbrown merged commit 5f84cb2 into howdyai:master May 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants