Add StripQuote option (telegram)

This commit is contained in:
jx11r
2022-09-28 19:47:57 -05:00
parent 0c83946983
commit 556a7f47da
3 changed files with 7 additions and 0 deletions

View File

@@ -156,6 +156,7 @@ type Protocol struct {
SkipVersionCheck bool // mattermost
StripNick bool // all protocols
StripMarkdown bool // irc
StripQuote bool // telegram
SyncTopic bool // slack
TengoModifyMessage string // general
Team string // mattermost, keybase

View File

@@ -114,6 +114,8 @@ func (b *Btelegram) handleQuoting(rmsg *config.Message, message *tgbotapi.Messag
quote := message.ReplyToMessage.Text
if quote == "" {
quote = message.ReplyToMessage.Caption
} else if b.GetBool("StripQuote") {
quote = strings.ReplaceAll(quote, "\n", " ")
}
rmsg.Text = b.handleQuote(rmsg.Text, usernameReply, quote)
}

View File

@@ -1146,6 +1146,10 @@ ShowJoinPart=false
#OPTIONAL (default false)
StripNick=false
#Replace line breaks with spaces in quoted messages to avoid flooding
#OPTIONAL (default false)
StripQuote=false
#Enable to show topic changes from other bridges
#Only works hiding/show topic changes from slack bridge for now
#OPTIONAL (default false)