A Swoosh-style local mailbox, but for Slack.
Implements SlackSandbox.Adapter by capturing every post_message/2 and
send_dm/2 call into SlackSandbox.Inbox instead of hitting the real
Slack API, so you can point your app at it in dev/test and watch
outbound messages arrive live in SlackSandbox.InboxLive.
Setup
Add
SlackSandbox.Inboxto your supervision tree:children = [ {SlackSandbox.Inbox, pubsub: MyApp.PubSub} ]Point your app's Slack adapter config at
SlackSandboxin dev:# config/dev.exs config :my_app, :slack_adapter, SlackSandboxMount the inbox page in your router:
live "/dev/slack-inbox", SlackSandbox.InboxLive
Everything your app sends through the configured adapter now shows up at
/dev/slack-inbox in real time, no Slack workspace required.