Add StripQuote option (telegram)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user