[MM-25659] ability to permanent delete channel through client (#15202)
Summary
Ability to permanent delete channel through client
Ticket Link
https://mattermost.atlassian.net/browse/MM-25659
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
11513a8d0d
Коммит
d76039db23
@@ -2345,10 +2345,18 @@ func (a *App) PermanentDeleteChannel(channel *model.Channel) *model.AppError {
|
||||
return model.NewAppError("PermanentDeleteChannel", "app.webhooks.permanent_delete_outgoing_by_channel.app_error", nil, err.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
|
||||
deleteAt := model.GetMillis()
|
||||
|
||||
if nErr := a.Srv().Store.Channel().PermanentDelete(channel.Id); nErr != nil {
|
||||
return model.NewAppError("PermanentDeleteChannel", "app.channel.permanent_delete.app_error", nil, nErr.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
|
||||
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)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user