diff --git a/telegram-application/src/core/tg_service/service.py b/telegram-application/src/core/tg_service/service.py index a143841..00615a0 100644 --- a/telegram-application/src/core/tg_service/service.py +++ b/telegram-application/src/core/tg_service/service.py @@ -52,14 +52,14 @@ async def check_chat_exists( ) -> None: chat = await redis_client.get(name=str(chat_id)) - # if chat: - # return + if chat: + return async with db_helper.get_async_session_not_closed() as session: chat = await session.get(TgChat, chat_id) if not chat: - await tg_crud.create_new_chat( + chat = await tg_crud.create_new_chat( session=session, id=chat_id, chat_type=chat_type, diff --git a/telegram-application/src/tg_account.session b/telegram-application/src/tg_account.session deleted file mode 100644 index 0d1d8a7..0000000 Binary files a/telegram-application/src/tg_account.session and /dev/null differ