Skip to content

Commit

Permalink
add dbg info on forward
Browse files Browse the repository at this point in the history
  • Loading branch information
umputun committed Dec 6, 2023
1 parent 73233d9 commit cd102be
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/events/telegram.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ func (l *TelegramListener) procEvents(update tbapi.Update) error {
}

func (l *TelegramListener) forwardToAdmin(banUserStr string, msg *bot.Message) {
log.Printf("[DEBUG] forward to admin ban data for %s, group: %d", banUserStr, l.adminChatID)
forwardMsg := fmt.Sprintf("**permanently banned [%s](tg://user?id=%d)**\n[unban](%s) if it was a mistake\n\n%s\n----",
banUserStr, msg.From.ID, l.unbanURL(msg.From.ID), strings.ReplaceAll(msg.Text, "\n", " "))
e := l.sendBotResponse(bot.Response{Send: true, Text: forwardMsg, ParseMode: tbapi.ModeMarkdown}, l.adminChatID)
Expand Down

0 comments on commit cd102be

Please sign in to comment.