diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-08-19 14:15:01 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-08-19 14:15:01 -0400 |
commit | 65f1d0297e2d8221de5e00bc8ec28c965395b598 (patch) | |
tree | 6a231685d858d3580372ef657ba36a6b8f1107ff /model | |
parent | fbc2283220240b564eec1a0a0a037443a78f8036 (diff) | |
parent | 11247061b5623140656e3ec0ee96b6566637a950 (diff) | |
download | chat-65f1d0297e2d8221de5e00bc8ec28c965395b598.tar.gz chat-65f1d0297e2d8221de5e00bc8ec28c965395b598.tar.bz2 chat-65f1d0297e2d8221de5e00bc8ec28c965395b598.zip |
Merge pull request #406 from mattermost/mm-1281
MM-1281 Track channel creator in DB and show in channel intro message
Diffstat (limited to 'model')
-rw-r--r-- | model/channel.go | 5 |
1 files changed, 5 insertions, 0 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 } |