WardrikSlack. Waiting
(wardrik_slack v0.1.0-rc.1)
Copy Markdown
Lays out the calls an agent waits on as one Slack message.
- Each call shows its tool, the policy's question and its arguments, with a note box and Approve and Deny buttons.
- A call waiting on a sign-in has Show link instead. It shows only the person who pressed it where to sign in.
Each button's value holds the conversation, the call and who asked, for WardrikSlack.Answers.
This is safe because only the bot can change its own messages.
Summary
Functions
Returns what calls ask for, in words.
Returns the block ID of the buttons for the call id.
Returns the blocks for calls, each with its question and buttons.
Returns the message that asks approvers about calls.
Returns approvers joined for a sentence. Member IDs become mentions.
Returns the block ID of the note box for the call id.
Functions
@spec asked([WardrikChannel.Waiting.t()]) :: String.t()
Returns what calls ask for, in words.
WardrikSlack.Waiting.asked(calls)
#=> "approve `echo` and sign in for `mail`"
Returns the block ID of the buttons for the call id.
@spec calls_blocks([WardrikChannel.Waiting.t()]) :: [map()]
Returns the blocks for calls, each with its question and buttons.
@spec message([WardrikChannel.Waiting.t()], [String.t()] | :anyone) :: %{ text: String.t(), blocks: [map()] }
Returns the message that asks approvers about calls.
Returns approvers joined for a sentence. Member IDs become mentions.
WardrikSlack.Waiting.named(["@maria", "@jon", "U024BE7LH"])
#=> "@maria, @jon or <@U024BE7LH>"
Returns the block ID of the note box for the call id.