Set default file_reference to b"" instead of None
This commit is contained in:
parent
b85096c4ce
commit
e0c3578fbb
@ -159,7 +159,7 @@ class FileId:
|
|||||||
minor: int = MINOR,
|
minor: int = MINOR,
|
||||||
file_type: FileType,
|
file_type: FileType,
|
||||||
dc_id: int,
|
dc_id: int,
|
||||||
file_reference: bytes = None,
|
file_reference: bytes = b"",
|
||||||
url: str = None,
|
url: str = None,
|
||||||
media_id: int = None,
|
media_id: int = None,
|
||||||
access_hash: int = None,
|
access_hash: int = None,
|
||||||
@ -239,7 +239,7 @@ class FileId:
|
|||||||
access_hash=access_hash
|
access_hash=access_hash
|
||||||
)
|
)
|
||||||
|
|
||||||
file_reference = Bytes.read(buffer) if has_file_reference else None
|
file_reference = Bytes.read(buffer) if has_file_reference else b""
|
||||||
media_id, access_hash = struct.unpack("<qq", buffer.read(16))
|
media_id, access_hash = struct.unpack("<qq", buffer.read(16))
|
||||||
|
|
||||||
if file_type in PHOTO_TYPES:
|
if file_type in PHOTO_TYPES:
|
||||||
|
Loading…
Reference in New Issue
Block a user