From 7b2faec9ae67355edf8799dfc99bbf2469777e2d Mon Sep 17 00:00:00 2001 From: io Date: Tue, 21 Sep 2021 16:56:04 +0000 Subject: [PATCH] fix posting on masto without a reply_to_id --- pleroma.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pleroma.py b/pleroma.py index 9d80a1a..dda9cd0 100644 --- a/pleroma.py +++ b/pleroma.py @@ -81,9 +81,9 @@ class Pleroma: if visibility not in {None, 'private', 'public', 'unlisted', 'direct'}: raise ValueError('invalid visibility', visibility) - in_reply_to_id = self._unpack_id(in_reply_to_id) - - data = dict(status=content, in_reply_to_id=in_reply_to_id) + data = dict(status=content) + if in_reply_to_id := self._unpack_id(in_reply_to_id): + data['in_reply_to_id'] = in_reply_to_id if visibility is not None: data['visibility'] = visibility if cw is not None: