Merge branch '536-fixed-populateUsers' into 499-google-translation

This commit is contained in:
Patrick Connolly
2018-10-24 15:43:35 +08:00

View File

@@ -65,8 +65,10 @@ func (b *Bslack) populateUsers() {
}
newUsers := map[string]*slack.User{}
for _, user := range users {
newUsers[user.ID] = &user
for i := range users {
// Use array index for pointer, not the copy
// See: https://stackoverflow.com/a/29498133/504018
newUsers[users[i].ID] = &users[i]
}
b.usersMutex.Lock()