From 40b750ceaed0d84f78e166b2210103f3eec1a240 Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Sun, 4 Aug 2019 16:20:56 +0200 Subject: [PATCH] Bugfix --- core/inbox.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/inbox.py b/core/inbox.py index 488606c..376f694 100644 --- a/core/inbox.py +++ b/core/inbox.py @@ -164,12 +164,11 @@ def _undo_process_inbox(activity: ap.Undo, new_meta: _NewMeta) -> None: obj = activity.get_object() DB.activities.update_one({"remote_id": obj.id}, {"$set": {"meta.undo": True}}) if obj.has_type(ap.ActivityType.LIKE): - liked = activity.get_object() # Update the meta counter if the object is published by the server DB.activities.update_one( { "box": Box.OUTBOX.value, - "meta.object_id": liked.id, + "meta.object_id": obj.get_object_id(), "type": ap.ActivityType.CREATE.value, }, {"$inc": {"meta.count_like": -1}},