mirror of
https://github.com/owncast/owncast.git
synced 2025-11-01 19:32:20 +08:00
Update to Go 1.20 + run better align (#2927)
* chore(go): update go version to 1.20. Closes #2185 * chore(go): run better align against project To optimize struct field order. Closes #2870 * chore(go): update CI jobs to use Go 1.20 * fix(go): linter warnings for Go 1.20 update
This commit is contained in:
@ -11,19 +11,19 @@ import (
|
||||
|
||||
// WebhookEvent represents an event sent as a webhook.
|
||||
type WebhookEvent struct {
|
||||
Type models.EventType `json:"type"` // messageSent | userJoined | userNameChange
|
||||
EventData interface{} `json:"eventData,omitempty"`
|
||||
Type models.EventType `json:"type"` // messageSent | userJoined | userNameChange
|
||||
}
|
||||
|
||||
// WebhookChatMessage represents a single chat message sent as a webhook payload.
|
||||
type WebhookChatMessage struct {
|
||||
User *user.User `json:"user,omitempty"`
|
||||
ClientID uint `json:"clientId,omitempty"`
|
||||
Timestamp *time.Time `json:"timestamp,omitempty"`
|
||||
Body string `json:"body,omitempty"`
|
||||
RawBody string `json:"rawBody,omitempty"`
|
||||
ID string `json:"id,omitempty"`
|
||||
ClientID uint `json:"clientId,omitempty"`
|
||||
Visible bool `json:"visible"`
|
||||
Timestamp *time.Time `json:"timestamp,omitempty"`
|
||||
}
|
||||
|
||||
// SendEventToWebhooks will send a single webhook event to all webhook destinations.
|
||||
|
||||
Reference in New Issue
Block a user