File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2271,6 +2271,12 @@ def convert_input_media_array(array):
22712271 if media_dict ['media' ].startswith ('attach://' ):
22722272 key = media_dict ['media' ].replace ('attach://' , '' )
22732273 files [key ] = input_media .media
2274+ if 'thumbnail' in media_dict :
2275+ thumbnail = media_dict ['thumbnail' ]
2276+ if isinstance (thumbnail , types .InputFile ):
2277+ thumbnail_key = 'thumbnail_' + key
2278+ files [thumbnail_key ] = thumbnail
2279+ media_dict ['thumbnail' ] = 'attach://' + thumbnail_key
22742280 media .append (media_dict )
22752281 return json .dumps (media ), files
22762282
Original file line number Diff line number Diff line change @@ -2243,6 +2243,12 @@ async def convert_input_media_array(array):
22432243 if media_dict ['media' ].startswith ('attach://' ):
22442244 key = media_dict ['media' ].replace ('attach://' , '' )
22452245 files [key ] = input_media .media
2246+ if 'thumbnail' in media_dict :
2247+ thumbnail = media_dict ['thumbnail' ]
2248+ if isinstance (thumbnail , types .InputFile ):
2249+ thumbnail_key = 'thumbnail_' + key
2250+ files [thumbnail_key ] = thumbnail
2251+ media_dict ['thumbnail' ] = 'attach://' + thumbnail_key
22462252 media .append (media_dict )
22472253 return json .dumps (media ), files
22482254
You can’t perform that action at this time.
0 commit comments