delete decline message
This commit is contained in:
parent
f6cbac70ad
commit
6222bde903
1 changed files with 3 additions and 3 deletions
|
|
@ -162,9 +162,6 @@ func (bot *Bot) HandleDeclineReason(update *api.Update) {
|
|||
}
|
||||
|
||||
userID, username, joinReason, declinedBy, declinedAt := utils.GetInfoFromMsg(repliedMsg.Text)
|
||||
if entities, _ := utils.FilterEntitiesByTypeWithContext(repliedMsg, "italic"); len(entities) >= 1 {
|
||||
username = fmt.Sprintf("<i>%s</i>", entities[0].Text)
|
||||
}
|
||||
|
||||
reason := utils.EscapeHTML(update.Message.Text)
|
||||
if strings.HasPrefix(update.Message.Text, "+") {
|
||||
|
|
@ -175,6 +172,9 @@ func (bot *Bot) HandleDeclineReason(update *api.Update) {
|
|||
|
||||
utils.EditMessage(bot.API, update.Message.Chat.ID, repliedMsg.MessageID,
|
||||
fmt.Sprintf(AdminDeclinedMsg, username, userID, joinReason, declinedBy, declinedAt, reason))
|
||||
|
||||
// Delete the admin's message after processing
|
||||
bot.API.Send(api.NewDeleteMessage(update.Message.Chat.ID, update.Message.MessageID))
|
||||
}
|
||||
|
||||
// parseCallbackData parses the action and user ID from a callback query's data string.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue