mirror of https://github.com/velour/catbase.git
slack: test checking both user and username when we have a botID
This commit is contained in:
parent
20bf8748a2
commit
f5f70bbdc8
|
@ -395,6 +395,9 @@ func (s *Slack) Serve() error {
|
||||||
botOK := true
|
botOK := true
|
||||||
if msg.BotID != "" {
|
if msg.BotID != "" {
|
||||||
u, _ := s.getUser(msg.User)
|
u, _ := s.getUser(msg.User)
|
||||||
|
if u == "" && msg.Username != "" {
|
||||||
|
u = msg.Username
|
||||||
|
}
|
||||||
log.Printf("User: %s, BotList: %+v", u, s.config.BotList)
|
log.Printf("User: %s, BotList: %+v", u, s.config.BotList)
|
||||||
botOK = s.config.BotList[strings.Title(u)]
|
botOK = s.config.BotList[strings.Title(u)]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue