feat(federation): Add ActivityPub bridge support with CLI command

This commit is contained in:
Jesse Wierzbinski 2024-07-16 23:29:20 +02:00
parent 153aa061f0
commit ff315af230
No known key found for this signature in database
13 changed files with 2337 additions and 15 deletions

View file

@ -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 }