[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>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
e1f72576fb
Коммит
51e73b681b
@@ -76,7 +76,7 @@ func (ps *PlatformService) PublishPluginClusterEvent(productID string, ev model.
|
||||
}
|
||||
|
||||
func (ps *PlatformService) PublishWebSocketEvent(productID string, event string, payload map[string]any, broadcast *model.WebsocketBroadcast) {
|
||||
ev := model.NewWebSocketEvent(fmt.Sprintf("custom_%v_%v", productID, event), "", "", "", nil, "")
|
||||
ev := model.NewWebSocketEvent(model.WebsocketEventType(fmt.Sprintf("custom_%v_%v", productID, event)), "", "", "", nil, "")
|
||||
ev = ev.SetBroadcast(broadcast).SetData(payload)
|
||||
ps.Publish(ev)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user