mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-22 18:52:02 -08:00
Trim nick whitespace when looking up the guild members (discord) (#2072)
this fixes the matching to attempt to find avatars fixes #2059
This commit is contained in:
parent
2e9db32a83
commit
6edd5de3b7
@ -68,7 +68,7 @@ func (b *Bdiscord) getGuildMemberByNick(nick string) (*discordgo.Member, error)
|
||||
b.membersMutex.RLock()
|
||||
defer b.membersMutex.RUnlock()
|
||||
|
||||
if member, ok := b.nickMemberMap[nick]; ok {
|
||||
if member, ok := b.nickMemberMap[strings.TrimSpace(nick)]; ok {
|
||||
return member, nil
|
||||
}
|
||||
return nil, errors.New("Couldn't find guild member with nick " + nick) // This will most likely get ignored by the caller
|
||||
|
Loading…
Reference in New Issue
Block a user