|
|
@ -222,18 +222,12 @@ func (b *Btelegram) handleRecv(updates <-chan tgbotapi.Update) {
|
|
|
|
usernameReply = "unknown"
|
|
|
|
usernameReply = "unknown"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if !b.GetBool("QuoteDisable") {
|
|
|
|
if !b.GetBool("QuoteDisable") {
|
|
|
|
rmsg.Text = rmsg.Text + " (re @" + usernameReply + ":"
|
|
|
|
rmsg.Text = rmsg.Text + " (re @" + usernameReply + ":" + message.ReplyToMessage.Text + ")"
|
|
|
|
// 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 {
|
|
|
|
|
|
|
|
rmsg.Text = helper.RemoveEmptyNewLines(rmsg.Text)
|
|
|
|
rmsg.Avatar = helper.GetAvatar(b.avatarMap, strconv.Itoa(message.From.ID), b.General)
|
|
|
|
rmsg.Avatar = helper.GetAvatar(b.avatarMap, strconv.Itoa(message.From.ID), b.General)
|
|
|
|
|
|
|
|
|
|
|
|
b.Log.Debugf("<= Sending message from %s on %s to gateway", rmsg.Username, b.Account)
|
|
|
|
b.Log.Debugf("<= Sending message from %s on %s to gateway", rmsg.Username, b.Account)
|
|
|
|