Skip to content

Commit

Permalink
リレーのHTTP-Signatureは投稿者の鍵でするように
Browse files Browse the repository at this point in the history
  • Loading branch information
mei23 committed May 14, 2020
1 parent d05d247 commit 21566ee
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/services/relay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,12 @@ export async function deliverToRelays(user: ILocalUser, activity: any) {
});
if (relays.length === 0) return;

const relayActor = await getRelayActor();

const copy = JSON.parse(JSON.stringify(activity));
if (!copy.to) copy.to = ['https://www.w3.org/ns/activitystreams#Public'];

const signed = await attachLdSignature(copy, user);

for (const relay of relays) {
deliver(relayActor, signed, relay.inbox);
deliver(user, signed, relay.inbox);
}
}

0 comments on commit 21566ee

Please sign in to comment.