mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-28 05:32:01 -08:00
Do not post empty messages (slack). Fixes #574
This commit is contained in:
parent
c6fd65d1d7
commit
0929535b2e
@ -356,6 +356,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) {
|
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 {
|
for {
|
||||||
_, id, err := b.rtm.PostMessage(channelInfo.ID, msg.Text, *messageParameters)
|
_, id, err := b.rtm.PostMessage(channelInfo.ID, msg.Text, *messageParameters)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user