Also update cached when receiving poll updates

This commit is contained in:
Thomas Sileo 2019-07-07 21:00:02 +02:00
parent 10f7e46242
commit ffdc6e781b

View file

@ -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