feat: 1-to-1 message render + web data-lake backend
This commit is contained in:
@@ -37,3 +37,20 @@ def snapshot_from_user(
|
||||
is_deleted_account=bool(getattr(raw_user, "deleted", False)),
|
||||
)
|
||||
return fields, photo_file_id, photo_unique_id
|
||||
|
||||
|
||||
def snapshot_from_high_level(
|
||||
user: User,
|
||||
) -> tuple[ProfileFields, str | None, str | None]:
|
||||
photo = user.photo
|
||||
photo_unique_id = photo.big_photo_unique_id if photo else None
|
||||
photo_file_id = photo.big_file_id if photo else None
|
||||
fields = ProfileFields(
|
||||
first_name=user.first_name,
|
||||
last_name=user.last_name,
|
||||
username=user.username,
|
||||
phone=user.phone_number,
|
||||
photo_unique_id=photo_unique_id,
|
||||
is_deleted_account=bool(user.is_deleted),
|
||||
)
|
||||
return fields, photo_file_id, photo_unique_id
|
||||
|
||||
Reference in New Issue
Block a user