jubot.adapter.slack
->SlackAdapter
(->SlackAdapter name server handler)
Positional factory function for class jubot.adapter.slack.SlackAdapter.
map->SlackAdapter
(map->SlackAdapter m__5869__auto__)
Factory function for class jubot.adapter.slack.SlackAdapter, taking a map of keywords to field values.
not-from-slackbot
(not-from-slackbot username text)
If the user name of inputted message is "slackbot", return text as it is.
If that's not the case, return nil.
Params
username - The user name of inputted message.
text - Message from user.
Return
Text string or nil.
process-output
(process-output this text & {:keys [as icon-url]})
Process output to Slack.
Params
this - Slack adapter.
:name - Bot's name.
text - Output text to Slack.
option
:as - Overwrite bot's name if you specify this option.
:icon-url - Customized icon URL.
valid-outgoing-token
(valid-outgoing-token token text)
If the outgoing token is valid, return text as it is.
If that's not the case, return nil.
Params
token - Outgoing token passed from slack.
text - Message from user.
Return
Text string or nil.
wrap-adapter
(wrap-adapter handler adapter bot-handler)
Ring middleware to wrap jubot adapter on request.
Params
handler - A ring handler.
adapter - A jubot adapter.
bot-handler - A jubot handler function.
Return
A ring handler.