-
Notifications
You must be signed in to change notification settings - Fork 119
this lib is a joke #271
Comments
messageMediaPhoto seems don't have file references anymore. Anyone have any ideas? |
Btw if anyone has FILE_REFERENCE_EXPIREd error, you must pass thumb_size even if you don't want to download thumb This function accepts sizes array as param, tries to find the best version of photo available and outputs string you need to pass as thumb_size: export function findSizeType(sizes: object[]): string {
return sizes.find(s => s['_'] === 'photoSizeProgressive')?.['type']
?? sizes.filter(s => s['_'] === 'photoSize').sort((a, b) => b['w']*b['h'] - a['w']*a['h'])?.['type']
?? sizes[0]['type']
} |
I don't have the problem with photoSize. Currently I call
And I want to get the photo from media object. Something like this
The error has appeared, due to missing file_reference. |
file reference is within that constructor, with id and access hash |
Fact check: true |
bold promises, yet outdated! |
and file references are expired and broken
The text was updated successfully, but these errors were encountered: