summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSoloam <11949987+soloam@users.noreply.github.com>2021-12-12 00:40:31 +0000
committerGitHub <noreply@github.com>2021-12-12 01:40:31 +0100
commitae2ad824a91456041c4fba04b926b4778153d997 (patch)
treeea2aa050d64d28a50ddd33decb26a272647e003f
parent02e3d7852bf37cc2dd65aa9d37fc3501e17203f8 (diff)
downloadmatterbridge-msglm-ae2ad824a91456041c4fba04b926b4778153d997.tar.gz
matterbridge-msglm-ae2ad824a91456041c4fba04b926b4778153d997.tar.bz2
matterbridge-msglm-ae2ad824a91456041c4fba04b926b4778153d997.zip
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>
-rw-r--r--.gitignore3
-rw-r--r--bridge/discord/webhook.go6
2 files changed, 5 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index e3ba009e..51f3f406 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,6 @@
# Exclude configuration file
matterbridge.toml
+
+# Exclude IDE Files
+.vscode
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{