summaryrefslogtreecommitdiffstats
path: root/app/channel.go
diff options
context:
space:
mode:
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 4164b37ce..bd9acaa6d 100644
--- a/app/channel.go
+++ b/app/channel.go
@@ -285,6 +285,14 @@ func UpdateChannel(channel *model.Channel) (*model.Channel, *model.AppError) {
}
}
+func RestoreChannel(channel *model.Channel) (*model.Channel, *model.AppError) {
+ if result := <-Srv.Store.Channel().Restore(channel.Id, model.GetMillis()); result.Err != nil {
+ return nil, result.Err
+ } else {
+ return channel, nil
+ }
+}
+
func PatchChannel(channel *model.Channel, patch *model.ChannelPatch, userId string) (*model.Channel, *model.AppError) {
oldChannelDisplayName := channel.DisplayName
oldChannelHeader := channel.Header