Remove comments about deprecating FileIds and HasReactions (#9869)

Этот коммит содержится в:
Harrison Healey
2018-11-22 13:09:27 -05:00
коммит произвёл GitHub
родитель 8dc865b917
Коммит 5388afd37e
2 изменённых файлов: 4 добавлений и 4 удалений

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

@@ -99,7 +99,7 @@ func (a *App) PreparePostForClient(originalPost *model.Post) *model.Post {
}
func (a *App) getFileMetadataForPost(post *model.Post) ([]*model.FileInfo, *model.AppError) {
if len(post.FileIds) == 0 { // This field is deprecated, but still use it for now to avoid unnecessary database hits
if len(post.FileIds) == 0 {
return nil, nil
}
@@ -108,7 +108,7 @@ func (a *App) getFileMetadataForPost(post *model.Post) ([]*model.FileInfo, *mode
func (a *App) getEmojisAndReactionsForPost(post *model.Post) ([]*model.Emoji, []*model.Reaction, *model.AppError) {
var reactions []*model.Reaction
if post.HasReactions { // This field is deprecated, but still use it for now to avoid unnecessary database hits
if post.HasReactions {
var err *model.AppError
reactions, err = a.GetReactionsForPost(post.Id)
if err != nil {

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

@@ -76,9 +76,9 @@ type Post struct {
Props StringInterface `json:"props"`
Hashtags string `json:"hashtags"`
Filenames StringArray `json:"filenames,omitempty"` // Deprecated, do not use this field any more
FileIds StringArray `json:"file_ids,omitempty"` // Deprecated, do not use this field any more
FileIds StringArray `json:"file_ids,omitempty"`
PendingPostId string `json:"pending_post_id" db:"-"`
HasReactions bool `json:"has_reactions,omitempty"` // Deprecated, do not use this field any more
HasReactions bool `json:"has_reactions,omitempty"`
// Transient data populated before sending a post to the client
Metadata *PostMetadata `json:"metadata" db:"-"`