summaryrefslogtreecommitdiffstats
path: root/bridge/telegram
diff options
context:
space:
mode:
Diffstat (limited to 'bridge/telegram')
-rw-r--r--bridge/telegram/telegram.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/bridge/telegram/telegram.go b/bridge/telegram/telegram.go
index 7298c2d6..d2f229f8 100644
--- a/bridge/telegram/telegram.go
+++ b/bridge/telegram/telegram.go
@@ -221,7 +221,16 @@ func (b *Btelegram) handleRecv(updates <-chan tgbotapi.Update) {
if usernameReply == "" {
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 {