From ddb3436275d3f02183f515c38cd3193cd1dfe2f4 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Sun, 13 Nov 2022 18:42:47 -0700 Subject: Boosting! Incoming, anyway. --- users/models/inbox_message.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'users/models') diff --git a/users/models/inbox_message.py b/users/models/inbox_message.py index 43424c9..6dbf5e8 100644 --- a/users/models/inbox_message.py +++ b/users/models/inbox_message.py @@ -12,12 +12,16 @@ class InboxMessageStates(StateGraph): @classmethod async def handle_received(cls, instance: "InboxMessage"): - from activities.models import Post + from activities.models import Post, PostInteraction from users.models import Follow match instance.message_type: case "follow": await sync_to_async(Follow.handle_request_ap)(instance.message) + case "announce": + await sync_to_async(PostInteraction.handle_ap)(instance.message) + case "like": + await sync_to_async(PostInteraction.handle_ap)(instance.message) case "create": match instance.message_object_type: case "note": -- cgit v1.2.3