mirror of https://github.com/velour/catbase.git
Merge pull request #163 from velour/msgtypes
slackapp: filter out ungood message types
This commit is contained in:
commit
bd169dd85b
|
@ -140,6 +140,17 @@ func (s *SlackApp) checkRingOrAdd(ts string) bool {
|
|||
}
|
||||
|
||||
func (s *SlackApp) msgReceivd(msg *slackevents.MessageEvent) {
|
||||
if msg.TimeStamp == "" {
|
||||
log.Debug().
|
||||
Str("type", msg.SubType).
|
||||
Msg("ignoring an unhandled event type")
|
||||
return
|
||||
}
|
||||
|
||||
log.Debug().
|
||||
Str("type", msg.SubType).
|
||||
Msg("accepting a message")
|
||||
|
||||
if s.checkRingOrAdd(msg.TimeStamp) {
|
||||
log.Debug().
|
||||
Str("ts", msg.TimeStamp).
|
||||
|
|
Loading…
Reference in New Issue