add fix for chat checker
This commit is contained in:
parent
7e1889ef6d
commit
d46efe25dc
@ -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,
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user