feat: allow user.search to handle remote handles, beginning of mentions support

This commit is contained in:
Julian Lam
2024-03-05 09:56:15 -05:00
parent 07c1ea2876
commit 1b64fdb5b3
6 changed files with 75 additions and 8 deletions

View File

@@ -57,10 +57,16 @@ Helpers.query = async (id) => {
({ href: actorUri } = actorUri);
}
const { publicKey } = body;
const { subject, publicKey } = body;
const payload = { subject, username, hostname, actorUri, publicKey };
webfingerCache.set(id, { username, hostname, actorUri, publicKey });
return { username, hostname, actorUri, publicKey };
const claimedId = subject.slice(5);
webfingerCache.set(claimedId, payload);
if (claimedId !== id) {
webfingerCache.set(id, payload);
}
return payload;
};
Helpers.generateKeys = async (type, id) => {