add fix for chat checker
This commit is contained in:
parent
7e1889ef6d
commit
d46efe25dc
@ -52,14 +52,14 @@ async def check_chat_exists(
|
|||||||
) -> None:
|
) -> None:
|
||||||
chat = await redis_client.get(name=str(chat_id))
|
chat = await redis_client.get(name=str(chat_id))
|
||||||
|
|
||||||
# if chat:
|
if chat:
|
||||||
# return
|
return
|
||||||
|
|
||||||
async with db_helper.get_async_session_not_closed() as session:
|
async with db_helper.get_async_session_not_closed() as session:
|
||||||
chat = await session.get(TgChat, chat_id)
|
chat = await session.get(TgChat, chat_id)
|
||||||
|
|
||||||
if not chat:
|
if not chat:
|
||||||
await tg_crud.create_new_chat(
|
chat = await tg_crud.create_new_chat(
|
||||||
session=session,
|
session=session,
|
||||||
id=chat_id,
|
id=chat_id,
|
||||||
chat_type=chat_type,
|
chat_type=chat_type,
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user