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
@@ -22,7 +22,16 @@ async def sync_contacts(ctx: JobContext) -> None:
|
||||
if not isinstance(user, User):
|
||||
continue
|
||||
fields, photo_file_id, photo_unique_id = snapshot_from_high_level(user)
|
||||
await write_profile(ctx.pool, ctx.account_id, user.id, fields, raw_json(user))
|
||||
await write_profile(
|
||||
ctx.pool,
|
||||
ctx.account_id,
|
||||
user.id,
|
||||
fields,
|
||||
raw_json(user),
|
||||
history=capture.resolve_peer(
|
||||
user.id, is_bot=bool(user.is_bot)
|
||||
).profile_history,
|
||||
)
|
||||
if photo_file_id and photo_unique_id:
|
||||
await note_avatar(
|
||||
ctx.pool,
|
||||
|
||||
Reference in new issue
Block a user