mirror of
https://github.com/versia-pub/server.git
synced 2025-12-08 01:08:19 +01:00
fix(federation): 🐛 Don't try to fetch from ActivityPub instances if no bridge is configured
This commit is contained in:
parent
ff315af230
commit
aae99c804a
|
|
@ -305,6 +305,10 @@ export class User extends BaseInterface<typeof Users, UserWithRelations> {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (instance.data.protocol === "activitypub") {
|
if (instance.data.protocol === "activitypub") {
|
||||||
|
if (!config.federation.bridge.enabled) {
|
||||||
|
throw new Error("ActivityPub bridge is not enabled");
|
||||||
|
}
|
||||||
|
|
||||||
const bridgeUri = new URL(
|
const bridgeUri = new URL(
|
||||||
`/apbridge/lysand/query?${new URLSearchParams({
|
`/apbridge/lysand/query?${new URLSearchParams({
|
||||||
user_url: uri,
|
user_url: uri,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue