commit 2cd032bf1748ac4fb5b0a4264aa3901e3f762252
Author: Wim <wim@42.be>
Date: Sat Jul 22 20:03:40 2017 +0000
diff --git a/bridge/slack/slack.go b/bridge/slack/slack.go
index 72392a6..6617f82 100644
--- a/bridge/slack/slack.go
+++ b/bridge/slack/slack.go
@@ -2226 +2229 @@ func (b *Bslack) handleSlack() {
if b.Config.WebhookURL == "" && b.Config.WebhookBindAddress == "" && message.Username == b.si.User.Name {
continue
}
+ if message.Text == "" || message.Username == "" {
+ continue
+ }
texts := strings.Split(message.Text, "\n")
for _, text := range texts {
text = b.replaceURL(text)
@@ -2797 +2828 @@ func (b *Bslack) handleSlackClient(mchan chan *MMMessage) {
}
m.Raw = ev
m.Text = b.replaceMention(m.Text)
- if ev.BotID != "" {
+ // when using webhookURL we can't check if it's our webhook or not for now
+ if ev.BotID != "" && b.Config.WebhookURL == "" {
bot, err := b.rtm.GetBotInfo(ev.BotID)
if err != nil {
continue