MM-12826 Include list of reactions in post metadata instead of just counts (#9749)

Этот коммит содержится в:
Harrison Healey
2018-10-26 11:26:32 -04:00
родитель 2190c37359
Коммит ba173414d9
5 изменённых файлов: 19 добавлений и 68 удалений

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

@@ -17,8 +17,6 @@ type Reaction struct {
CreateAt int64 `json:"create_at"`
}
type ReactionCounts map[string]int
func (o *Reaction) ToJson() string {
b, _ := json.Marshal(o)
return string(b)
@@ -76,13 +74,3 @@ func (o *Reaction) PreSave() {
o.CreateAt = GetMillis()
}
}
func CountReactions(reactions []*Reaction) ReactionCounts {
reactionCounts := ReactionCounts{}
for _, reaction := range reactions {
reactionCounts[reaction.EmojiName] += 1
}
return reactionCounts
}