summaryrefslogtreecommitdiffstats
path: root/app/channel.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/channel.go')
-rw-r--r--app/channel.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/channel.go b/app/channel.go
index 1f5d308bf..025eccfcd 100644
--- a/app/channel.go
+++ b/app/channel.go
@@ -866,3 +866,19 @@ func ViewChannel(view *model.ChannelView, teamId string, userId string, clearPus
return nil
}
+
+func PermanentDeleteChannel(channel *model.Channel) *model.AppError {
+ if result := <-Srv.Store.Post().PermanentDeleteByChannel(channel.Id); result.Err != nil {
+ return result.Err
+ }
+
+ if result := <-Srv.Store.Channel().PermanentDeleteMembersByChannel(channel.Id); result.Err != nil {
+ return result.Err
+ }
+
+ if result := <-Srv.Store.Channel().PermanentDelete(channel.Id); result.Err != nil {
+ return result.Err
+ }
+
+ return nil
+}