First attempt at introducing replies for media captions
Not entirely sure how to quote other non-text messages so I added an error message instead.
This commit is contained in:
@@ -232,7 +232,13 @@ func (b *Btelegram) handleRecv(updates <-chan tgbotapi.Update) {
|
||||
usernameReply = "unknown"
|
||||
}
|
||||
if !b.GetBool("QuoteDisable") {
|
||||
rmsg.Text = b.handleQuote(rmsg.Text, usernameReply, message.ReplyToMessage.Text)
|
||||
if message.ReplyToMessage.Text != "" {
|
||||
rmsg.Text = b.handleQuote(rmsg.Text, usernameReply, message.ReplyToMessage.Text)
|
||||
} else if message.ReplyToMessage.Caption != "" {
|
||||
rmsg.Text = b.handleQuote(rmsg.Text, usernameReply, message.ReplyToMessage.Caption)
|
||||
} else {
|
||||
rmsg.Text = b.handleQuote(rmsg.Text, usernameReply, "matterbridge: Unsupported message content")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user