1
0
mirror of https://github.com/civsocit/olgram.git synced 2025-05-24 10:13:25 +00:00
This commit is contained in:
er8dd 2024-03-22 18:15:27 +04:00
parent eca5c53233
commit 7e4f671911

View File

@ -283,7 +283,10 @@ async def handle_operator_message(message: types.Message, super_chat_id: int, bo
# в супер-чате кто-то пишет сообщение сам себе, только для личных сообщений
if bot.enable_mailing:
asyncio.create_task(MailingUser.get_or_create(telegram_id=message.chat.id, bot=bot))
await message.forward(super_chat_id)
try:
await message.forward(super_chat_id)
except exceptions.MessageCantBeForwarded:
await message.copy_to(super_chat_id)
# И отправить пользователю специальный текст, если он указан
if bot.second_text:
return SendMessage(chat_id=message.chat.id, text=bot.second_text, parse_mode="HTML")