Add support for profile metadata

This commit is contained in:
Thomas Sileo 2022-08-10 08:58:18 +02:00
parent ff59e49866
commit e8397f802d
6 changed files with 62 additions and 7 deletions

View file

@ -257,6 +257,14 @@ def _actor_hash(actor: Actor) -> bytes:
if actor.icon_url:
h.update(actor.icon_url.encode())
if actor.attachments:
for a in actor.attachments:
if a.get("type") != "PropertyValue":
continue
h.update(a["name"].encode())
h.update(a["value"].encode())
h.update(actor.public_key_id.encode())
h.update(actor.public_key_as_pem.encode())