diff options
Diffstat (limited to 'model/channel.go')
-rw-r--r-- | model/channel.go | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/model/channel.go b/model/channel.go index 076ddf0b5..ac54a7e44 100644 --- a/model/channel.go +++ b/model/channel.go @@ -24,7 +24,8 @@ type Channel struct { Type string `json:"type"` DisplayName string `json:"display_name"` Name string `json:"name"` - Description string `json:"description"` + Header string `json:"header"` + Purpose string `json:"purpose"` LastPostAt int64 `json:"last_post_at"` TotalMsgCount int64 `json:"total_msg_count"` ExtraUpdateAt int64 `json:"extra_update_at"` @@ -89,8 +90,12 @@ func (o *Channel) IsValid() *AppError { return NewAppError("Channel.IsValid", "Invalid type", "id="+o.Id) } - if len(o.Description) > 1024 { - return NewAppError("Channel.IsValid", "Invalid description", "id="+o.Id) + if len(o.Header) > 1024 { + return NewAppError("Channel.IsValid", "Invalid header", "id="+o.Id) + } + + if len(o.Purpose) > 128 { + return NewAppError("Channel.IsValid", "Invalid purpose", "id="+o.Id) } if len(o.CreatorId) > 26 { |