From 08edba4891be13f57a04324ed1cbf470de12db2f Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Tue, 16 Mar 2021 12:00:21 -0700 Subject: [PATCH] Ignore activities that expect dict args but get strs Some Undo activities are coming from Pleroma with just the id of the activity, rather than the serialized object. There isn't an obvious way to know what is being undone, so for now this just ignores those --- bookwyrm/activitypub/verbs.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bookwyrm/activitypub/verbs.py b/bookwyrm/activitypub/verbs.py index c63cd5dc4..d684171e9 100644 --- a/bookwyrm/activitypub/verbs.py +++ b/bookwyrm/activitypub/verbs.py @@ -64,6 +64,11 @@ class Undo(Verb): def action(self): """ find and remove the activity object """ + if isinstance(self.object, str): + # it may be that sometihng should be done with these, but idk what + # this seems just to be coming from pleroma + return + # this is so hacky but it does make it work.... # (because you Reject a request and Undo a follow model = None