Closed titpetric closed 5 years ago
More info: the interface for webhooks should be reachable from the channel list (right click on channel, manage webhooks - if the user has the manage.webhooks permission for this).
The API signatures have changed to be only available under /webhook
entrypoint.
Additionally, outgoing webhooks have been implemented. A webhook trigger word, for example fortune
, will enable a /fortune
command which will query an external API, and produce a message in the active channel on response. There's room for improvement - like having commands that produce a direct-message response.
There's an incoming webhook API needed for our purposes. The intent of the API is to provide a simple link which can be used as a web hook from scripts or third party services, that allows sending messages to a particular channel. When creating a webhook, we need to define:
Ideally, we would take "username", "avatar", and "contents" as the webhooks JSON body parameters. This enables users to use one webhook to post messages seen uniquely in a channel based on different username/avatar parameters. This requires:
meta
json),rel_user
(we also need to update it if the webhook details would be changed),I'd like to stick to the discord API example as the main guideline because of it's usability. Ideally our API would be similar, but with a smaller surface:
This is a minimal subset of API calls needed to support a basic incoming webhook API. Discord provides specific APIs for hooks sent from GitHub, Slack, but we don't need to support that at this point, or maybe we can think of a better way how to support them in the future.
Future ideas: