Skip to content

Commit

Permalink
make sure initial reaction is the one shown (keybase#24014)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaxim authored Apr 29, 2020
1 parent 15ce7ff commit 7d559a1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion go/chat/emojisource.go
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,11 @@ func (s *DevConvEmojiSource) Decorate(ctx context.Context, body string, uid greg
defer s.Trace(ctx, nil, "Decorate")()
emojiMap := make(map[string]chat1.EmojiRemoteSource, len(emojis))
for _, emoji := range emojis {
emojiMap[emoji.Alias] = emoji.Source
// If we have conflicts on alias, use the first one. This helps make dealing with reactions
// better, since we really want the first reaction on an alias to always be displayed.
if _, ok := emojiMap[emoji.Alias]; !ok {
emojiMap[emoji.Alias] = emoji.Source
}
}
offset := 0
added := 0
Expand Down

0 comments on commit 7d559a1

Please sign in to comment.