Add comments to messages (telegram) (#1652)

* Add's comments to message in telegram messages

This is a change to handle comments in telegram messages!

Some messages in telegram have comments added to the message! This normally is the description in images or links. This changes appends the comment to the message if available.

This should fix the issue in #1649

* [fix] discord: send comments in extras

Co-authored-by: Wim <wim@42.be>
This commit is contained in:
Soloam 2021-12-12 00:40:31 +00:00 committed by GitHub
parent 02e3d7852b
commit ae2ad824a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

3
.gitignore vendored
View File

@ -4,3 +4,6 @@
# Exclude configuration file
matterbridge.toml
# Exclude IDE Files
.vscode

View File

@ -82,10 +82,8 @@ func (b *Bdiscord) webhookSend(msg *config.Message, channelID string) (*discordg
ContentType: "",
Reader: bytes.NewReader(*fi.Data),
}
content := ""
if msg.Text == "" {
content = fi.Comment
}
content := fi.Comment
_, e2 := b.transmitter.Send(
channelID,
&discordgo.WebhookParams{