commit 2a1f8379dbd2418d50c10ff17aff0d99b6c902a6
Author: Wim <wim@42.be>
Date: Sun Feb 02 18:53:04 2020 +0000
diff --git a/bridge/config/config.go b/bridge/config/config.go
index 105d568..84e8f75 100644
--- a/bridge/config/config.go
+++ b/bridge/config/config.go
@@ -796 +797 @@ type Protocol struct {
ColorNicks bool // only irc for now
Debug bool // general
DebugLevel int // only for irc now
+ DisableWebPagePreview bool // telegram
EditSuffix string // mattermost, slack, discord, telegram, gitter
EditDisable bool // mattermost, slack, discord, telegram, gitter
IconURL string // mattermost, slack
diff --git a/bridge/telegram/telegram.go b/bridge/telegram/telegram.go
index c7ead21..ac45985 100644
--- a/bridge/telegram/telegram.go
+++ b/bridge/telegram/telegram.go
@@ -1316 +1319 @@ func (b *Btelegram) sendMessage(chatid int64, username, text string) (string, er
m.Text = username + html.EscapeString(text)
m.ParseMode = tgbotapi.ModeHTML
}
+
+ m.DisableWebPagePreview = b.GetBool("DisableWebPagePreview")
+
res, err := b.c.Send(m)
if err != nil {
return "", err
diff --git a/matterbridge.toml.sample b/matterbridge.toml.sample
index af3c5df..d9d596e 100644
--- a/matterbridge.toml.sample
+++ b/matterbridge.toml.sample
@@ -8376 +83710 @@ Token="Yourtokenhere"
#HTMLNick only allows HTML for the nick, the message itself will be html-escaped
MessageFormat=""
+#OPTIONAL (default false)
+#Disables link previews for links in messages
+DisableWebPagePreview=false
+
#If enabled use the "First Name" as username. If this is empty use the Username
#If disabled use the "Username" as username. If this is empty use the First Name
#If all names are empty, username will be "unknown"