fix: swap stats/admin back buttons, fix summary message KeyError
This commit is contained in:
+3
-3
@@ -509,7 +509,7 @@ async def _handle_callback(update: Update, context: ContextTypes.DEFAULT_TYPE) -
|
||||
chat_id=chat_id, text=text, parse_mode="HTML", reply_markup=kb,
|
||||
)
|
||||
|
||||
name = user["first_name"] or "there"
|
||||
name = update.effective_user.first_name or "there" # type: ignore[union-attr]
|
||||
summary_chat_id = update.effective_chat.id # type: ignore[union-attr]
|
||||
try:
|
||||
await context.bot.send_message(
|
||||
@@ -539,7 +539,7 @@ async def _handle_callback(update: Update, context: ContextTypes.DEFAULT_TYPE) -
|
||||
await query.edit_message_text(
|
||||
text=text, parse_mode="HTML",
|
||||
reply_markup=InlineKeyboardMarkup([
|
||||
[InlineKeyboardButton("↩ Back", callback_data="back:admin")],
|
||||
[InlineKeyboardButton("↩ Back", callback_data="menu:")],
|
||||
]),
|
||||
)
|
||||
|
||||
@@ -851,7 +851,7 @@ async def _handle_callback(update: Update, context: ContextTypes.DEFAULT_TYPE) -
|
||||
kb = InlineKeyboardMarkup([
|
||||
[InlineKeyboardButton("➕ Add User", callback_data="admin_add"),
|
||||
InlineKeyboardButton("🗑 Remove User", callback_data="admin_remove")],
|
||||
[InlineKeyboardButton("↩ Back", callback_data="menu:")],
|
||||
[InlineKeyboardButton("↩ Back", callback_data="back:admin")],
|
||||
])
|
||||
await query.edit_message_text(text=text, parse_mode="HTML", reply_markup=kb)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user