-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to follow a user on Betula #185
Comments
Hmm, Postmarks follow request is not working with either format of username. To be investigated further asap. |
OK, tracked this down - Betula does not work with I actually believe that the current code with |
Right. If I change the Postmarks code to remove the Modified // actorUsername format is @username@domain
export async function lookupActorInfo(actorUsername) {
const parsedDomain = actorUsername.split('@').slice(-1);
const parsedUsername = actorUsername.split('@').slice(-2, -1);
try {
const response = await fetch(`https://${parsedDomain}/.well-known/webfinger?resource=acct:${parsedUsername}@${parsedDomain}`);
console.log(response);
const data = await response.json();
console.log('---');
console.log(data);
const selfLink = data.links.find((o) => o.rel === 'self');
if (!selfLink || !selfLink.href) {
throw new Error();
}
return selfLink.href;
} catch (e) {
console.log("couldn't look up canonical actor info");
return null;
}
} Response:
This is super weird as the JSON looks fine to me. The error seems to indicate to me that the JSON parser is getting a bunch of HTML, not well-formed JSON. I am baffled right now. I'll continue to do some experimentation on this when I can. |
Attempting to follow a Betula user (Betula is currently adding AP support).
Following @[email protected] results in
This appears to be because WebFinger is only responding to [email protected] (without the leading
@
so this is likely something to address in Postmarks, either in the UI validation for following users, or in the lookup code.The text was updated successfully, but these errors were encountered: