From 5a9f7801b4779a75d504aad942d05f05ed205be6 Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Sun, 8 Sep 2019 17:04:08 +0200 Subject: [PATCH] Tweak the actor hash for the CI --- core/activitypub.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/activitypub.py b/core/activitypub.py index aa90817..ef77853 100644 --- a/core/activitypub.py +++ b/core/activitypub.py @@ -93,9 +93,10 @@ def _actor_hash(actor: ap.ActivityType, local: bool = False) -> str: h.update(actor.icon["url"].encode()) if local: # The local hash helps us detect when to send an Update - for item in actor.attachment: - h.update(item["name"].encode()) - h.update(item["value"].encode()) + if actor.attachment: + for item in actor.attachment: + h.update(item["name"].encode()) + h.update(item["value"].encode()) h.update(("1" if actor.manuallyApprovesFollowers else "0").encode()) return h.hexdigest()