From 72f61ab96aabf65c162c8d94b5b843b5108ee1a9 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 31 Jul 2017 08:52:45 -0700 Subject: make cli team / channel delete operations also delete webhooks and slash commands (#7028) --- app/channel.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/channel.go') diff --git a/app/channel.go b/app/channel.go index b077c0399..03df0e800 100644 --- a/app/channel.go +++ b/app/channel.go @@ -1184,6 +1184,14 @@ func PermanentDeleteChannel(channel *model.Channel) *model.AppError { return result.Err } + if result := <-Srv.Store.Webhook().PermanentDeleteIncomingByChannel(channel.Id); result.Err != nil { + return result.Err + } + + if result := <-Srv.Store.Webhook().PermanentDeleteOutgoingByChannel(channel.Id); result.Err != nil { + return result.Err + } + if result := <-Srv.Store.Channel().PermanentDelete(channel.Id); result.Err != nil { return result.Err } -- cgit v1.2.3-1-g7c22