Minor code tweaks

This commit is contained in:
Anthony Wang 2023-01-18 18:55:53 +00:00
parent 6900034f2e
commit 60bf76a75e
No known key found for this signature in database
GPG key ID: 42A5B952E6DD8D38
2 changed files with 2 additions and 3 deletions

View file

@ -5,11 +5,10 @@ from email.utils import formatdate
from requests import post
from sys import argv
date = formatdate(usegmt=True)
with open(argv[1], 'rb') as f:
activity = f.read()
date = formatdate(usegmt=True)
digester = hashes.Hash(hashes.SHA256())
digester.update(activity)
digest = b64encode(digester.finalize()).decode()

View file

@ -1,6 +1,6 @@
{
"@context": "https://www.w3.org/ns/activitystreams",
"id": "https://0.exozy.me/users/test.outbox/follow",
"id": "https://0.exozy.me/users/test.outbox#follow",
"type": "Follow",
"actor": "https://0.exozy.me/users/test.jsonld",
"object": "https://social.exozy.me/users/a"