Skip to content

Conversation

@lf-
Copy link
Contributor

@lf- lf- commented Apr 15, 2025

This turns out to be necessary for the impressively messed up nonsense that Slack does with their interactive webhooks, which range from "json in a form parameter" (WHAT) to "entirely putting the thing in form parameters".

More code to support this may come in the future, but we need this foundation to be able to disentangle the bad code in mwb using this.

Sadly does a breaking change due to import Web.Slack.Experimental.RequestVerification (SlackVerificationFailed(..)) no longer importing constructors. The rest of this is not breaking changes.

Before submitting your PR, check that you've:

After submitting your PR:

  • Update the Changelog.md file with a link to your PR
  • Bumped the version number if there isn't an (unreleased) on the Changelog
  • Check that CI passes (or if it fails, for reasons unrelated to your change, like CI timeouts)

This turns out to be necessary for the impressively messed up nonsense
that Slack does with their interactive webhooks, which range from "json
in a form parameter" (WHAT) to "entirely putting the thing in form
parameters".

More code to support this may come in the future, but we need this
foundation to be able to disentangle the bad code in mwb using this.
@linear
Copy link

linear bot commented Apr 15, 2025

@lf- lf- force-pushed the jadel/dux-3346 branch from 4fd6e84 to 92d0ead Compare April 15, 2025 23:39
@lf- lf- requested a review from 9999years April 15, 2025 23:39
@lf- lf- force-pushed the jadel/dux-3346 branch from 92d0ead to 7274ae9 Compare April 16, 2025 18:16
Comment on lines +123 to +124
validateRequestRaw decoder secret sig reqTs body =
liftIO getPOSIXTime >>= \time -> pure $ validateRequestRaw' decoder time secret sig reqTs body
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
validateRequestRaw decoder secret sig reqTs body =
liftIO getPOSIXTime >>= \time -> pure $ validateRequestRaw' decoder time secret sig reqTs body
validateRequestRaw decoder secret sig reqTs body = do
time <- liftIO getPOSIXTime
pure $ validateRequestRaw' decoder time secret sig reqTs body

Use do notation here.

Copy link
Member

@9999years 9999years left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tiny nit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants