add tests for webhook events (#2180)

* add tests for webhook events

* atomic.Uint32 is not in Go 1.18
This commit is contained in:
Matthew Donoughe
2022-10-10 01:55:54 -04:00
committed by GitHub
parent 155d671df0
commit 10055664bb
10 changed files with 596 additions and 12 deletions

View File

@@ -42,3 +42,14 @@ func SendChatEventUserJoined(event events.UserJoinedEvent) {
SendEventToWebhooks(webhookEvent)
}
// SendChatEventSetMessageVisibility sends a webhook notifying that the visibility of one or more
// messages has changed.
func SendChatEventSetMessageVisibility(event events.SetMessageVisibilityEvent) {
webhookEvent := WebhookEvent{
Type: models.VisibiltyToggled,
EventData: event,
}
SendEventToWebhooks(webhookEvent)
}