[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
@@ -137,7 +137,7 @@ func (a *App) DeleteReactionForPost(c request.CTX, reaction *model.Reaction) *mo
|
||||
return nil
|
||||
}
|
||||
|
||||
func (a *App) sendReactionEvent(event string, reaction *model.Reaction, post *model.Post) {
|
||||
func (a *App) sendReactionEvent(event model.WebsocketEventType, reaction *model.Reaction, post *model.Post) {
|
||||
// send out that a reaction has been added/removed
|
||||
message := model.NewWebSocketEvent(event, "", post.ChannelId, "", nil, "")
|
||||
reactionJSON, err := json.Marshal(reaction)
|
||||
|
||||
Ссылка в новой задаче
Block a user