Merge pull request #391 from n-peugnet/fix-add-reaction-increment

Fix redraw of incremented reaction counts
This commit is contained in:
Tulir Asokan 2022-10-18 14:06:52 +03:00 committed by GitHub
commit 1b097337df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -133,9 +133,10 @@ func newUIMessage(evt *muksevt.Event, displayname string, renderer MessageRender
func (msg *UIMessage) AddReaction(key string) {
found := false
for _, rs := range msg.Reactions {
for i, rs := range msg.Reactions {
if rs.Key == key {
rs.Count++
msg.Reactions[i] = rs
found = true
break
}