summaryrefslogtreecommitdiffstats
path: root/app/channel.go
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2017-07-31 08:52:45 -0700
committerHarrison Healey <harrisonmhealey@gmail.com>2017-07-31 11:52:45 -0400
commit72f61ab96aabf65c162c8d94b5b843b5108ee1a9 (patch)
treec80d7158613663a0b3f584a1736ef1cbff72d160 /app/channel.go
parent0f786a42d3289df9b4f5bdb4bddb0ecb07631608 (diff)
downloadchat-72f61ab96aabf65c162c8d94b5b843b5108ee1a9.tar.gz
chat-72f61ab96aabf65c162c8d94b5b843b5108ee1a9.tar.bz2
chat-72f61ab96aabf65c162c8d94b5b843b5108ee1a9.zip
make cli team / channel delete operations also delete webhooks and slash commands (#7028)
Diffstat (limited to 'app/channel.go')
-rw-r--r--app/channel.go8
1 files changed, 8 insertions, 0 deletions
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
}