From 2ef709b6421b238025276aa53bf1c3764696a660 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Tue, 15 Nov 2022 18:36:39 -0700 Subject: Accept incoming action undos --- users/models/inbox_message.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'users') diff --git a/users/models/inbox_message.py b/users/models/inbox_message.py index b9bcfb4..55eb3cb 100644 --- a/users/models/inbox_message.py +++ b/users/models/inbox_message.py @@ -42,6 +42,14 @@ class InboxMessageStates(StateGraph): match instance.message_object_type: case "follow": await sync_to_async(Follow.handle_undo_ap)(instance.message) + case "like": + await sync_to_async(PostInteraction.handle_undo_ap)( + instance.message + ) + case "announce": + await sync_to_async(PostInteraction.handle_undo_ap)( + instance.message + ) case unknown: raise ValueError( f"Cannot handle activity of type undo.{unknown}" -- cgit v1.2.3