From d6b80b8f6649a033260f1d856494c3450f46f127 Mon Sep 17 00:00:00 2001 From: mihalin Date: Thu, 16 Jun 2022 04:10:08 +0300 Subject: [PATCH] fix additional info messages --- server/custom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/custom.py b/server/custom.py index 5a32a54..0278124 100644 --- a/server/custom.py +++ b/server/custom.py @@ -76,11 +76,11 @@ async def send_user_message(message: types.Message, super_chat_id: int, bot): new_message = await message.bot.send_message(super_chat_id, message.text + "\n\n" + user_info) else: # Не добавлять информацию в конец текста, информация отдельным сообщением new_message = await message.bot.send_message(super_chat_id, text=user_info) - await _redis.set(_message_unique_id(bot.pk, new_message.message_id), message.chat.id, - pexpire=ServerSettings.redis_timeout_ms()) new_message_2 = await message.copy_to(super_chat_id, reply_to_message_id=new_message.message_id) await _redis.set(_message_unique_id(bot.pk, new_message_2.message_id), message.chat.id, pexpire=ServerSettings.redis_timeout_ms()) + await _redis.set(_message_unique_id(bot.pk, new_message.message_id), message.chat.id, + pexpire=ServerSettings.redis_timeout_ms()) return new_message else: new_message = await message.forward(super_chat_id)