Fix wrong URI for the relay's followers collection
[relay.git/.git] / relay / actor.py
index eb5c869..ad09ecb 100644 (file)
@@ -22,8 +22,8 @@ if "actorKeys" not in DATABASE:
     pubkey = privkey.publickey()
 
     DATABASE["actorKeys"] = {
-        "publicKey": pubkey.exportKey('PEM'),
-        "privateKey": privkey.exportKey('PEM')
+        "publicKey": pubkey.exportKey('PEM').decode('utf-8'),
+        "privateKey": privkey.exportKey('PEM').decode('utf-8')
     }
 
 
@@ -193,7 +193,7 @@ async def handle_relay(actor, data, request):
     message = {
         "@context": "https://www.w3.org/ns/activitystreams",
         "type": "Announce",
-        "to": ["https://{}/actor/followers".format(request.host)],
+        "to": ["https://{}/followers".format(request.host)],
         "actor": "https://{}/actor".format(request.host),
         "object": object_id,
         "id": activity_id