fix(userbot): presence, story and profile history toggles of the capture policy take effect for each user peer
This commit is contained in:
1 parent
f32b772ddc
commit
92e5e737d2
10 files changed
+100
-25
No files matched your search
@@ -49,8 +49,14 @@ async def get_peer(
|
||||
)
|
||||
|
||||
|
||||
async def write_profile(
|
||||
pool: asyncpg.Pool, account_id: int, peer_id: int, fields: ProfileFields, raw: str
|
||||
async def write_profile( # noqa: PLR0913
|
||||
pool: asyncpg.Pool,
|
||||
account_id: int,
|
||||
peer_id: int,
|
||||
fields: ProfileFields,
|
||||
raw: str,
|
||||
*,
|
||||
history: bool,
|
||||
) -> None:
|
||||
args = (
|
||||
fields.first_name,
|
||||
@@ -63,4 +69,5 @@ async def write_profile(
|
||||
)
|
||||
async with pool.acquire() as conn, conn.transaction():
|
||||
await conn.execute(_UPSERT_PEER, account_id, peer_id, *args)
|
||||
await conn.execute(_INSERT_HISTORY, account_id, peer_id, *args)
|
||||
if history:
|
||||
await conn.execute(_INSERT_HISTORY, account_id, peer_id, *args)
|
||||
Reference in new issue
Block a user