Skip to content
Snippets Groups Projects
Unverified Commit 2170c27b authored by MeiMei's avatar MeiMei Committed by GitHub
Browse files

リレーのHTTP-Signatureは投稿者の鍵でするように (#6357)

parent 61582a0a
No related branches found
No related tags found
No related merge requests found
...@@ -83,14 +83,12 @@ export async function deliverToRelays(user: ILocalUser, activity: any) { ...@@ -83,14 +83,12 @@ export async function deliverToRelays(user: ILocalUser, activity: any) {
}); });
if (relays.length === 0) return; if (relays.length === 0) return;
const relayActor = await getRelayActor();
const copy = JSON.parse(JSON.stringify(activity)); const copy = JSON.parse(JSON.stringify(activity));
if (!copy.to) copy.to = ['https://www.w3.org/ns/activitystreams#Public']; if (!copy.to) copy.to = ['https://www.w3.org/ns/activitystreams#Public'];
const signed = await attachLdSignature(copy, user); const signed = await attachLdSignature(copy, user);
for (const relay of relays) { for (const relay of relays) {
deliver(relayActor, signed, relay.inbox); deliver(user, signed, relay.inbox);
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment