diff options
Diffstat (limited to 'bridge')
-rw-r--r-- | bridge/slack/helpers.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bridge/slack/helpers.go b/bridge/slack/helpers.go index 18dded3b..8508d152 100644 --- a/bridge/slack/helpers.go +++ b/bridge/slack/helpers.go @@ -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() |