diff options
author | halcy <halcy@ARARAGI-KUN> | 2022-11-08 23:24:42 +0200 |
---|---|---|
committer | halcy <halcy@ARARAGI-KUN> | 2022-11-08 23:24:42 +0200 |
commit | d0b1da993d4a38469106d6bd52dab6254bbd0053 (patch) | |
tree | 5ec0bf85db3f0a67f7668b18d741c785ffda1036 /mastodon | |
parent | 3277ca777821e76955fb26d80788939a311db9db (diff) | |
download | mastodon.py-d0b1da993d4a38469106d6bd52dab6254bbd0053.tar.gz |
add media v2 API + tests, move v1 test
Diffstat (limited to 'mastodon')
-rw-r--r-- | mastodon/Mastodon.py | 5 |
1 files changed, 1 insertions, 4 deletions
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: | |||
1817 | if not isinstance(media_ids, (list, tuple)): | 1817 | if not isinstance(media_ids, (list, tuple)): |
1818 | media_ids = [media_ids] | 1818 | media_ids = [media_ids] |
1819 | for media_id in media_ids: | 1819 | for media_id in media_ids: |
1820 | if isinstance(media_id, dict): | 1820 | media_ids_proper.append(self.__unpack_id(media_id)) |
1821 | media_ids_proper.append(media_id["id"]) | ||
1822 | else: | ||
1823 | media_ids_proper.append(media_id) | ||
1824 | except Exception as e: | 1821 | except Exception as e: |
1825 | raise MastodonIllegalArgumentError("Invalid media " | 1822 | raise MastodonIllegalArgumentError("Invalid media " |
1826 | "dict: %s" % e) | 1823 | "dict: %s" % e) |