This PR adds a custom JSON parser for the SlashCommand struct to work correctly when "is_enterprise_install" comes in as either a string or a boolean. As noted in the issue, in socket mode, certain (but not all 🤷) payloads have "is_enterprise_install" as a quoted boolean (e.g. "false") whereas others have it as an actual boolean (e.g. false).
This doesn't update the IsEnterpriseInstall field in SlashCommand itself, so this change should be transparent to anyone who might have started using that newly added field.
This PR adds a custom JSON parser for the
SlashCommand
struct to work correctly when"is_enterprise_install"
comes in as either a string or a boolean. As noted in the issue, in socket mode, certain (but not all 🤷) payloads have"is_enterprise_install"
as a quoted boolean (e.g."false"
) whereas others have it as an actual boolean (e.g.false
).This doesn't update the
IsEnterpriseInstall
field inSlashCommand
itself, so this change should be transparent to anyone who might have started using that newly added field.Fixes https://github.com/slack-go/slack/issues/1265 Prior fix attempt: https://github.com/slack-go/slack/pull/1264
Testing: