WardrikSlack. Approvers
(wardrik_slack v0.1.0-rc.1)
Copy Markdown
Finds approvers' Slack member IDs, to message each directly.
| Approver | Looked up with | Scope |
|---|---|---|
U024BE7LH | used as is | |
maria@... | users.lookupByEmail | users:read.email |
@maria | users.list | users:read |
Deleted members are skipped. Approvers are looked up each time a call waits. Nothing is cached.
Summary
Functions
Returns whether approver is a Slack member ID, such as U024BE7LH.
Returns each approver with its member ID, or :error if Slack has none.
Functions
Returns whether approver is a Slack member ID, such as U024BE7LH.
@spec members(WardrikChannel.Workspace.t(), [String.t()]) :: [ {String.t(), {:ok, String.t()} | :error} ]
Returns each approver with its member ID, or :error if Slack has none.
WardrikSlack.Approvers.members(workspace, ["@maria", "nobody@example.com"])
#=> [{"@maria", {:ok, "U024BE7LH"}}, {"nobody@example.com", :error}]