diff options
author | Jesús Espino <jespinog@gmail.com> | 2018-09-03 17:07:51 +0200 |
---|---|---|
committer | Carlos Tadeu Panato Junior <ctadeu@gmail.com> | 2018-09-03 17:07:51 +0200 |
commit | 72560311a27bb957576416739cca5e71c8665980 (patch) | |
tree | b8b8b92e83787d228ff94d41452f9f0f36315ca6 /store/sqlstore | |
parent | 9f465127592f2f3c893988daceaf608671da9df1 (diff) | |
download | chat-72560311a27bb957576416739cca5e71c8665980.tar.gz chat-72560311a27bb957576416739cca5e71c8665980.tar.bz2 chat-72560311a27bb957576416739cca5e71c8665980.zip |
MM-11728: Avoid Archived channels editions throught Patch (#9335)
Diffstat (limited to 'store/sqlstore')
-rw-r--r-- | store/sqlstore/channel_store.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/store/sqlstore/channel_store.go b/store/sqlstore/channel_store.go index 6d0c7353f..fba37d7cb 100644 --- a/store/sqlstore/channel_store.go +++ b/store/sqlstore/channel_store.go @@ -463,6 +463,11 @@ func (s SqlChannelStore) Update(channel *model.Channel) store.StoreChannel { return store.Do(func(result *store.StoreResult) { channel.PreUpdate() + if channel.DeleteAt != 0 { + result.Err = model.NewAppError("SqlChannelStore.Update", "store.sql_channel.update.archived_channel.app_error", nil, "", http.StatusBadRequest) + return + } + if result.Err = channel.IsValid(); result.Err != nil { return } |