Skip to content

Commit e0c3578

Browse files
committed
Set default file_reference to b"" instead of None
1 parent b85096c commit e0c3578

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pyrogram/file_id.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def __init__(
159159
minor: int = MINOR,
160160
file_type: FileType,
161161
dc_id: int,
162-
file_reference: bytes = None,
162+
file_reference: bytes = b"",
163163
url: str = None,
164164
media_id: int = None,
165165
access_hash: int = None,
@@ -239,7 +239,7 @@ def decode(file_id: str):
239239
access_hash=access_hash
240240
)
241241

242-
file_reference = Bytes.read(buffer) if has_file_reference else None
242+
file_reference = Bytes.read(buffer) if has_file_reference else b""
243243
media_id, access_hash = struct.unpack("<qq", buffer.read(16))
244244

245245
if file_type in PHOTO_TYPES:

0 commit comments

Comments
 (0)