Noah Petherbridge
05eb852bb9
* Added support for Webhooks and you can configure a Report Message hook to let users report messages on chat. * Add /reconfigure command to dynamically reload the server settings.toml * TODO: documentation for the webhooks.
22 lines
491 B
Go
22 lines
491 B
Go
package barertc
|
|
|
|
// WebhookRequest is a JSON request wrapper around all webhook messages.
|
|
type WebhookRequest struct {
|
|
Action string
|
|
APIKey string
|
|
|
|
// Relevant body per request.
|
|
Report WebhookRequestReport `json:",omitempty"`
|
|
}
|
|
|
|
// WebhookRequestReport is the body for 'report' webhook messages.
|
|
type WebhookRequestReport struct {
|
|
FromUsername string
|
|
AboutUsername string
|
|
Channel string
|
|
Timestamp string
|
|
Reason string
|
|
Message string
|
|
Comment string
|
|
}
|