mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-28 11:31:34 +00:00
Do not post empty messages (slack). Fixes #574
This commit is contained in:
parent
ba674af5d4
commit
73501739d5
@ -357,6 +357,10 @@ func (b *Bslack) editMessage(msg *config.Message, channelInfo *slack.Channel) (b
|
||||
}
|
||||
|
||||
func (b *Bslack) postMessage(msg *config.Message, messageParameters *slack.PostMessageParameters, channelInfo *slack.Channel) (string, error) {
|
||||
// don't post empty messages
|
||||
if msg.Text == "" {
|
||||
return "", nil
|
||||
}
|
||||
for {
|
||||
_, id, err := b.rtm.PostMessage(channelInfo.ID, msg.Text, *messageParameters)
|
||||
if err == nil {
|
||||
|
Loading…
Reference in New Issue
Block a user