From d815aa53e1c5bc2b1530794966030b3ce4019601 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Sun, 12 Nov 2023 11:21:23 -0700 Subject: [PATCH] Ignore lemmy-flavour likes and dislikes --- users/models/inbox_message.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/users/models/inbox_message.py b/users/models/inbox_message.py index 83891f1..5609a77 100644 --- a/users/models/inbox_message.py +++ b/users/models/inbox_message.py @@ -26,6 +26,10 @@ class InboxMessageStates(StateGraph): case "block": Block.handle_ap(instance.message) case "announce": + # Ignore Lemmy-specific likes and dislikes for perf reasons + # (we can't parse them anyway) + if instance.message_object_type in ["like", "dislike"]: + return cls.processed PostInteraction.handle_ap(instance.message) case "like": PostInteraction.handle_ap(instance.message)