5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-25 22:31:35 +00:00

Add error message about webhook (slack)

This commit is contained in:
Wim 2018-05-27 22:14:31 +02:00
parent 411ef2691c
commit 696c518550

View File

@ -573,6 +573,10 @@ func (b *Bslack) handleMessageEvent(ev *slack.MessageEvent) (*config.Message, er
// Only deleted messages can have a empty username and text
if (rmsg.Text == "" || rmsg.Username == "") && ev.SubType != messageDeleted {
// this is probably a webhook we couldn't resolve
if ev.BotID != "" {
return nil, fmt.Errorf("probably an incoming webhook we couldn't resolve (maybe ourselves)")
}
return nil, fmt.Errorf("empty message and not a deleted message")
}