summaryrefslogtreecommitdiffstats
path: root/bridge/discord
diff options
context:
space:
mode:
authorWim <wim@42.be>2017-11-13 00:20:31 +0100
committerWim <wim@42.be>2017-11-13 00:20:31 +0100
commit36a800c3f57ed1880ed6530db0542c979f6c69e7 (patch)
tree045b287bd5087558e3756f870a4336061490ef60 /bridge/discord
parent6d21f84187cddf17a2758a57bc77c37ed9e7ba70 (diff)
downloadmatterbridge-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.go3
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
}
}