5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-22 12:50:27 +00:00

Add space before file upload comment (slack) (#1554)

This commit is contained in:
Brian V 2021-07-27 17:52:30 +01:00 committed by GitHub
parent da4dcec14d
commit 13bbeeaceb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -459,7 +459,7 @@ func (b *Bslack) uploadFile(msg *config.Message, channelID string) {
b.cache.Add("filename"+fi.Name, ts) b.cache.Add("filename"+fi.Name, ts)
initialComment := fmt.Sprintf("File from %s", msg.Username) initialComment := fmt.Sprintf("File from %s", msg.Username)
if fi.Comment != "" { if fi.Comment != "" {
initialComment += fmt.Sprintf("with comment: %s", fi.Comment) initialComment += fmt.Sprintf(" with comment: %s", fi.Comment)
} }
res, err := b.sc.UploadFile(slack.FileUploadParameters{ res, err := b.sc.UploadFile(slack.FileUploadParameters{
Reader: bytes.NewReader(*fi.Data), Reader: bytes.NewReader(*fi.Data),