Merge pull request #406 from mattermost/mm-1281

MM-1281 Track channel creator in DB and show in channel intro message
Этот коммит содержится в:
Christopher Speller
2015-08-19 14:15:01 -04:00
родитель fbc2283220 11247061b5
Коммит 65f1d0297e
4 изменённых файлов: 23 добавлений и 5 удалений

Просмотреть файл

@@ -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
}