diff options
author | Wim <wim@42.be> | 2017-11-13 00:20:31 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2017-11-13 00:20:31 +0100 |
commit | 36a800c3f57ed1880ed6530db0542c979f6c69e7 (patch) | |
tree | 045b287bd5087558e3756f870a4336061490ef60 /bridge/discord | |
parent | 6d21f84187cddf17a2758a57bc77c37ed9e7ba70 (diff) | |
download | matterbridge-msglm-36a800c3f57ed1880ed6530db0542c979f6c69e7.tar.gz matterbridge-msglm-36a800c3f57ed1880ed6530db0542c979f6c69e7.tar.bz2 matterbridge-msglm-36a800c3f57ed1880ed6530db0542c979f6c69e7.zip |
Add support for comments from slack file uploads (slack)
Diffstat (limited to 'bridge/discord')
-rw-r--r-- | bridge/discord/discord.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bridge/discord/discord.go b/bridge/discord/discord.go index 12e0d827..183b1193 100644 --- a/bridge/discord/discord.go +++ b/bridge/discord/discord.go @@ -151,11 +151,12 @@ func (b *bdiscord) Send(msg config.Message) (string, error) { fi := f.(config.FileInfo) files := []*discordgo.File{} files = append(files, &discordgo.File{fi.Name, "", bytes.NewReader(*fi.Data)}) - _, err = b.c.ChannelMessageSendComplex(channelID, &discordgo.MessageSend{Content: msg.Text, Files: files}) + _, err = b.c.ChannelMessageSendComplex(channelID, &discordgo.MessageSend{Content: msg.Username + fi.Comment, Files: files}) if err != nil { flog.Errorf("file upload failed: %#v", err) } } + return "", nil } } |