mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-22 20:23:49 +01:00
リレーのHTTP-Signatureは投稿者の鍵でするように (#6357)
This commit is contained in:
parent
b5e4f5f4aa
commit
7e973520cd
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user