From ae2ad824a91456041c4fba04b926b4778153d997 Mon Sep 17 00:00:00 2001 From: Soloam <11949987+soloam@users.noreply.github.com> Date: Sun, 12 Dec 2021 00:40:31 +0000 Subject: 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 --- bridge/discord/webhook.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'bridge/discord/webhook.go') diff --git a/bridge/discord/webhook.go b/bridge/discord/webhook.go index 7b136bcb..3afb942d 100644 --- a/bridge/discord/webhook.go +++ b/bridge/discord/webhook.go @@ -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{ -- cgit v1.2.3