[MM-40638] Type all of the websocket event names as a new type WebsocketEventType (#25454)

Co-authored-by: Sudheer Tripathi <sudheer@clearglass.com>
Co-authored-by: Sudheer Tripathi <31629433+sudheer121@users.noreply.github.com>
Co-authored-by: Sudheer Tripathi <tripathisudheer604@gmail.com>
Этот коммит содержится в:
Ben Schumacher
2023-11-22 11:09:48 +01:00
коммит произвёл GitHub
родитель e1f72576fb
Коммит 51e73b681b
19 изменённых файлов: 118 добавлений и 115 удалений

Просмотреть файл

@@ -957,7 +957,7 @@ func (api *PluginAPI) KVList(page, perPage int) ([]string, *model.AppError) {
}
func (api *PluginAPI) PublishWebSocketEvent(event string, payload map[string]any, broadcast *model.WebsocketBroadcast) {
ev := model.NewWebSocketEvent(fmt.Sprintf("custom_%v_%v", api.id, event), "", "", "", nil, "")
ev := model.NewWebSocketEvent(model.WebsocketEventType(fmt.Sprintf("custom_%v_%v", api.id, event)), "", "", "", nil, "")
ev = ev.SetBroadcast(broadcast).SetData(payload)
api.app.Publish(ev)
}