mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
feat(federation): ✨ Add ActivityPub bridge support with CLI command
This commit is contained in:
parent
153aa061f0
commit
ff315af230
13 changed files with 2337 additions and 15 deletions
|
|
@ -305,8 +305,14 @@ export class User extends BaseInterface<typeof Users, UserWithRelations> {
|
|||
}
|
||||
|
||||
if (instance.data.protocol === "activitypub") {
|
||||
// Placeholder for ActivityPub user fetching
|
||||
throw new Error("ActivityPub user fetching not implemented");
|
||||
const bridgeUri = new URL(
|
||||
`/apbridge/lysand/query?${new URLSearchParams({
|
||||
user_url: uri,
|
||||
})}`,
|
||||
config.federation.bridge.url,
|
||||
);
|
||||
|
||||
return await User.saveFromLysand(bridgeUri.toString(), instance);
|
||||
}
|
||||
|
||||
throw new Error(`Unsupported protocol: ${instance.data.protocol}`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue