mirror of
https://github.com/mattermost/mattermost.git
synced 2026-09-24 16:05:00 +08:00
MM-11510: Adds delete at value to delete channel websocket event. (#9217)
This commit is contained in:
committed by
Carlos Tadeu Panato Junior
parent
04749027f6
commit
30ded2489f
+4
-1
@@ -726,13 +726,16 @@ func (a *App) DeleteChannel(channel *model.Channel, userId string) *model.AppErr
|
||||
}
|
||||
}
|
||||
|
||||
if dresult := <-a.Srv.Store.Channel().Delete(channel.Id, model.GetMillis()); dresult.Err != nil {
|
||||
deleteAt := model.GetMillis()
|
||||
|
||||
if dresult := <-a.Srv.Store.Channel().Delete(channel.Id, deleteAt); dresult.Err != nil {
|
||||
return dresult.Err
|
||||
}
|
||||
a.InvalidateCacheForChannel(channel)
|
||||
|
||||
message := model.NewWebSocketEvent(model.WEBSOCKET_EVENT_CHANNEL_DELETED, channel.TeamId, "", "", nil)
|
||||
message.Add("channel_id", channel.Id)
|
||||
message.Add("delete_at", deleteAt)
|
||||
a.Publish(message)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user