From 285610667bd7ebecf4d58bf557571de783c39311 Mon Sep 17 00:00:00 2001 From: Kay Faraday Date: Sun, 3 Jul 2022 01:39:58 +0000 Subject: [PATCH] use v1 API for posting images instead of v2 Apparently even when using the v2 API, which returns image IDs before they're finished processing, you have to wait for them to finish before attaching them to a post, which defeats the purpose. Use v1 API to avoid this. --- pleroma.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pleroma.py b/pleroma.py index b8caaf7..2926d62 100644 --- a/pleroma.py +++ b/pleroma.py @@ -107,7 +107,7 @@ class Pleroma: data.add_field('description', description) if focus is not None: data.add_field(','.join(map(str, focus))) - return await self.request('POST', '/api/v2/media', data=data) + return await self.request('POST', '/api/v1/media', data=data) async def reply(self, to_status, content, *, cw=None): user_id = await self._get_logged_in_id()