MM-12826 Include list of reactions in post metadata instead of just counts (#9749)
Этот коммит содержится в:
@@ -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
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user