From d0b1da993d4a38469106d6bd52dab6254bbd0053 Mon Sep 17 00:00:00 2001 From: halcy Date: Tue, 8 Nov 2022 23:24:42 +0200 Subject: add media v2 API + tests, move v1 test --- mastodon/Mastodon.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'mastodon') diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index 53b6bc1..a370deb 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py @@ -1817,10 +1817,7 @@ class Mastodon: if not isinstance(media_ids, (list, tuple)): media_ids = [media_ids] for media_id in media_ids: - if isinstance(media_id, dict): - media_ids_proper.append(media_id["id"]) - else: - media_ids_proper.append(media_id) + media_ids_proper.append(self.__unpack_id(media_id)) except Exception as e: raise MastodonIllegalArgumentError("Invalid media " "dict: %s" % e) -- cgit v1.2.3