diff options
Diffstat (limited to 'app/team.go')
-rw-r--r-- | app/team.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/team.go b/app/team.go index 6225f3ee0..c1560d45a 100644 --- a/app/team.go +++ b/app/team.go @@ -539,8 +539,13 @@ func PermanentDeleteTeam(team *model.Team) *model.AppError { return result.Err } - if result := <-Srv.Store.Channel().PermanentDeleteByTeam(team.Id); result.Err != nil { + if result := <-Srv.Store.Channel().GetTeamChannels(team.Id); result.Err != nil { return result.Err + } else { + channels := result.Data.(*model.ChannelList) + for _, c := range *channels { + PermanentDeleteChannel(c) + } } if result := <-Srv.Store.Team().RemoveAllMembersByTeam(team.Id); result.Err != nil { |