summaryrefslogtreecommitdiffstats
path: root/model
diff options
context:
space:
mode:
Diffstat (limited to 'model')
-rw-r--r--model/channel.go5
-rw-r--r--model/utils.go2
2 files changed, 6 insertions, 1 deletions
diff --git a/model/channel.go b/model/channel.go
index 94b8fdb43..b46f79f75 100644
--- a/model/channel.go
+++ b/model/channel.go
@@ -28,6 +28,7 @@ type Channel struct {
LastPostAt int64 `json:"last_post_at"`
TotalMsgCount int64 `json:"total_msg_count"`
ExtraUpdateAt int64 `json:"extra_update_at"`
+ CreatorId string `json:"creator_id"`
}
func (o *Channel) ToJson() string {
@@ -92,6 +93,10 @@ func (o *Channel) IsValid() *AppError {
return NewAppError("Channel.IsValid", "Invalid description", "id="+o.Id)
}
+ if len(o.CreatorId) > 26 {
+ return NewAppError("Channel.IsValid", "Invalid creator id", "")
+ }
+
return nil
}
diff --git a/model/utils.go b/model/utils.go
index c7f991da2..a8257467b 100644
--- a/model/utils.go
+++ b/model/utils.go
@@ -18,7 +18,7 @@ import (
const (
// Also change web/react/stores/browser_store.jsx BROWSER_STORE_VERSION
- ETAG_ROOT_VERSION = "11"
+ ETAG_ROOT_VERSION = "12"
)
type StringMap map[string]string