mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-24 21:19:32 +01:00
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:
parent
02e3d7852b
commit
ae2ad824a9
3
.gitignore
vendored
3
.gitignore
vendored
@ -4,3 +4,6 @@
|
|||||||
|
|
||||||
# Exclude configuration file
|
# Exclude configuration file
|
||||||
matterbridge.toml
|
matterbridge.toml
|
||||||
|
|
||||||
|
# Exclude IDE Files
|
||||||
|
.vscode
|
||||||
|
@ -82,10 +82,8 @@ func (b *Bdiscord) webhookSend(msg *config.Message, channelID string) (*discordg
|
|||||||
ContentType: "",
|
ContentType: "",
|
||||||
Reader: bytes.NewReader(*fi.Data),
|
Reader: bytes.NewReader(*fi.Data),
|
||||||
}
|
}
|
||||||
content := ""
|
content := fi.Comment
|
||||||
if msg.Text == "" {
|
|
||||||
content = fi.Comment
|
|
||||||
}
|
|
||||||
_, e2 := b.transmitter.Send(
|
_, e2 := b.transmitter.Send(
|
||||||
channelID,
|
channelID,
|
||||||
&discordgo.WebhookParams{
|
&discordgo.WebhookParams{
|
||||||
|
Loading…
Reference in New Issue
Block a user