refactor(federation): ⬆️ Refactor code to use v2.2 of federation SDK

This commit is contained in:
Jesse Wierzbinski 2024-07-26 18:07:11 +02:00
parent aca837cb16
commit ad9ed2598c
No known key found for this signature in database
12 changed files with 73 additions and 79 deletions

View file

@ -320,12 +320,13 @@ export const parseTextMentions = async (
author.data.privateKey ?? "",
author.getUri(),
);
const manager = new FederationRequester(
new URL(`https://${person?.[2] ?? ""}`),
signatureConstructor,
);
const manager = new FederationRequester(signatureConstructor);
const uri = await User.webFinger(manager, person?.[1] ?? "");
const uri = await User.webFinger(
manager,
person?.[1] ?? "",
person?.[2] ?? "",
);
const user = await User.resolve(uri);