diff options
author | Wim <wim@42.be> | 2017-09-08 00:16:17 +0200 |
---|---|---|
committer | Wim <wim@42.be> | 2017-09-08 00:16:17 +0200 |
commit | 90397200132e3e93d6a7b7c30abad62cd13f83ce (patch) | |
tree | 73d4f7c4e18e32f9607bce08cea0a82fca8f854f /matterclient | |
parent | a3470f8aec6f38efbb80f9bf2ec0776421e687de (diff) | |
download | matterbridge-msglm-90397200132e3e93d6a7b7c30abad62cd13f83ce.tar.gz matterbridge-msglm-90397200132e3e93d6a7b7c30abad62cd13f83ce.tar.bz2 matterbridge-msglm-90397200132e3e93d6a7b7c30abad62cd13f83ce.zip |
Send images when text is empty regression. (mattermost). Closes #254
Diffstat (limited to 'matterclient')
-rw-r--r-- | matterclient/matterclient.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/matterclient/matterclient.go b/matterclient/matterclient.go index f2aa44d9..bfaae952 100644 --- a/matterclient/matterclient.go +++ b/matterclient/matterclient.go @@ -277,6 +277,13 @@ func (m *MMClient) WsReceiver() { // check if we didn't empty the message if msg.Text != "" { m.MessageChan <- msg + continue + } + // if we have file attached but the message is empty, also send it + if msg.Post != nil { + if msg.Text != "" || len(msg.Post.FileIds) > 0 { + m.MessageChan <- msg + } } continue } |