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
11
utils/api.ts
11
utils/api.ts
|
|
@ -106,6 +106,17 @@ export const webfingerMention = createRegExp(
|
|||
[],
|
||||
);
|
||||
|
||||
export const parseUserAddress = (address: string) => {
|
||||
let output = address;
|
||||
// Remove leading @ if it exists
|
||||
if (output.startsWith("@")) {
|
||||
output = output.slice(1);
|
||||
}
|
||||
|
||||
const [username, domain] = output.split("@");
|
||||
return { username, domain };
|
||||
};
|
||||
|
||||
export const handleZodError = (
|
||||
result:
|
||||
| { success: true; data?: object }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue