Using correct type for websocket events (#26825)

This commit is contained in:
Ben Schumacher 2024-04-22 11:06:58 +02:00 committed by GitHub
parent 9e6da03ab1
commit 423809e0d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 6 deletions

View File

@ -10,7 +10,7 @@ import (
func (api *API) InitSystem() {
api.Router.Handle("ping", api.APIWebSocketHandler(ping))
api.Router.Handle(model.WebsocketPostedNotifyAck, api.APIWebSocketHandler(api.websocketNotificationAck))
api.Router.Handle(string(model.WebsocketPostedNotifyAck), api.APIWebSocketHandler(api.websocketNotificationAck))
}
func ping(req *model.WebSocketRequest) (map[string]any, *model.AppError) {

View File

@ -87,12 +87,12 @@ const (
WebsocketEventAcknowledgementRemoved WebsocketEventType = "post_acknowledgement_removed"
WebsocketEventPersistentNotificationTriggered WebsocketEventType = "persistent_notification_triggered"
WebsocketEventHostedCustomerSignupProgressUpdated WebsocketEventType = "hosted_customer_signup_progress_updated"
WebsocketEventChannelBookmarkCreated = "channel_bookmark_created"
WebsocketEventChannelBookmarkUpdated = "channel_bookmark_updated"
WebsocketEventChannelBookmarkDeleted = "channel_bookmark_deleted"
WebsocketEventChannelBookmarkSorted = "channel_bookmark_sorted"
WebsocketEventChannelBookmarkCreated WebsocketEventType = "channel_bookmark_created"
WebsocketEventChannelBookmarkUpdated WebsocketEventType = "channel_bookmark_updated"
WebsocketEventChannelBookmarkDeleted WebsocketEventType = "channel_bookmark_deleted"
WebsocketEventChannelBookmarkSorted WebsocketEventType = "channel_bookmark_sorted"
WebsocketPresenceIndicator WebsocketEventType = "presence"
WebsocketPostedNotifyAck = "posted_notify_ack"
WebsocketPostedNotifyAck WebsocketEventType = "posted_notify_ack"
)
type WebSocketMessage interface {