From ffdc6e781b2565a879d092e33ba447190a563bb7 Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Sun, 7 Jul 2019 21:00:02 +0200 Subject: [PATCH] Also update cached when receiving poll updates --- activitypub.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/activitypub.py b/activitypub.py index 69ea08b..68d6545 100644 --- a/activitypub.py +++ b/activitypub.py @@ -446,6 +446,10 @@ class MicroblogPubBackend(Backend): DB.activities.update_one( {"box": Box.INBOX.value, "activity.object.id": obj.id}, {"$set": _set} ) + # Also update the cached copies of the question (like Announce and Like) + DB.activities.update_many( + {"meta.object.id": obj.id}, {"$set": {"meta.object": obj.to_dict()}} + ) # FIXME(tsileo): handle update actor amd inbox_update_note/inbox_update_actor