Remove location attribute in packing bot_file_id

This commit is contained in:
igerzog 2021-12-22 18:52:46 +03:00
parent f9643bf737
commit 5341848190

View File

@ -1265,10 +1265,10 @@ def pack_bot_file_id(file):
if not size: if not size:
return None return None
size = size.location # Location is depricated since layer 128. See #3242
return _encode_telegram_base64(_rle_encode(struct.pack( return _encode_telegram_base64(_rle_encode(struct.pack(
'<iiqqqqib', 2, file.dc_id, file.id, file.access_hash, '<iiqqqqib', 2, file.dc_id, file.id, file.access_hash,
size.volume_id, 0, size.local_id, 2 # 0 = old `secret` 0, 0, 0, 2 # 0 = old `secret`
))) )))
else: else:
return None return None