mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-22 08:10:26 +00:00
Add QuoteDisable option (telegram). Closes #399
This commit is contained in:
parent
68fbed9281
commit
e57f3a7e6c
@ -92,6 +92,7 @@ type Protocol struct {
|
|||||||
Password string // IRC,mattermost,XMPP,matrix
|
Password string // IRC,mattermost,XMPP,matrix
|
||||||
PrefixMessagesWithNick bool // mattemost, slack
|
PrefixMessagesWithNick bool // mattemost, slack
|
||||||
Protocol string // all protocols
|
Protocol string // all protocols
|
||||||
|
QuoteDisable bool // telegram
|
||||||
RejoinDelay int // IRC
|
RejoinDelay int // IRC
|
||||||
ReplaceMessages [][]string // all protocols
|
ReplaceMessages [][]string // all protocols
|
||||||
ReplaceNicks [][]string // all protocols
|
ReplaceNicks [][]string // all protocols
|
||||||
|
@ -221,7 +221,16 @@ func (b *Btelegram) handleRecv(updates <-chan tgbotapi.Update) {
|
|||||||
if usernameReply == "" {
|
if usernameReply == "" {
|
||||||
usernameReply = "unknown"
|
usernameReply = "unknown"
|
||||||
}
|
}
|
||||||
rmsg.Text = rmsg.Text + " (re @" + usernameReply + ":" + message.ReplyToMessage.Text + ")"
|
if !b.GetBool("QuoteDisable") {
|
||||||
|
rmsg.Text = rmsg.Text + " (re @" + usernameReply + ":"
|
||||||
|
// remove empty lines
|
||||||
|
for _, m := range strings.Split(message.ReplyToMessage.Text, "\n") {
|
||||||
|
if m != "" {
|
||||||
|
rmsg.Text = rmsg.Text + m
|
||||||
|
}
|
||||||
|
}
|
||||||
|
rmsg.Text = rmsg.Text + ")"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if rmsg.Text != "" || len(rmsg.Extra) > 0 {
|
if rmsg.Text != "" || len(rmsg.Extra) > 0 {
|
||||||
|
@ -787,6 +787,10 @@ UseFirstName=false
|
|||||||
#OPTIONAL (default false)
|
#OPTIONAL (default false)
|
||||||
UseInsecureURL=false
|
UseInsecureURL=false
|
||||||
|
|
||||||
|
#Disable quoted/reply messages
|
||||||
|
#OPTIONAL (default false)
|
||||||
|
QuoteDisable=false
|
||||||
|
|
||||||
#Disable sending of edits to other bridges
|
#Disable sending of edits to other bridges
|
||||||
#OPTIONAL (default false)
|
#OPTIONAL (default false)
|
||||||
EditDisable=false
|
EditDisable=false
|
||||||
|
Loading…
Reference in New Issue
Block a user