mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-24 02:43:08 +02:00
リレーのHTTP-Signatureは投稿者の鍵でするように (#6357)
This commit is contained in:
parent
61582a0a33
commit
2170c27b62
1 changed files with 1 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue