File tree Expand file tree Collapse file tree 1 file changed +2
-14
lines changed
pyrogram/client/methods/users Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change 1616# You should have received a copy of the GNU Lesser General Public License
1717# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
1818
19- from struct import unpack
2019from typing import List , Union
2120
22- from pyrogram .api import functions , types
21+ from pyrogram .api import functions
2322from pyrogram .client .ext import utils
2423from ...ext import BaseClient
2524
@@ -52,18 +51,7 @@ async def delete_profile_photos(
5251 app.delete_profile_photos([p.file_id for p in photos[1:]])
5352 """
5453 photo_ids = photo_ids if isinstance (photo_ids , list ) else [photo_ids ]
55- input_photos = []
56-
57- for photo_id in photo_ids :
58- unpacked = unpack ("<iiqqc" , utils .decode_file_id (photo_id ))
59-
60- input_photos .append (
61- types .InputPhoto (
62- id = unpacked [2 ],
63- access_hash = unpacked [3 ],
64- file_reference = b""
65- )
66- )
54+ input_photos = [utils .get_input_media_from_file_id (i ).id for i in photo_ids ]
6755
6856 return bool (await self .send (
6957 functions .photos .DeletePhotos (
You can’t perform that action at this time.
0 commit comments