Skip to content

Commit ee767f9

Browse files
committed
remove: heuristic fallback
1 parent 45eb14e commit ee767f9

1 file changed

Lines changed: 0 additions & 15 deletions

File tree

packages/botkit/src/pages.tsx

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -470,25 +470,10 @@ app.post("/follow", async (c) => {
470470
return c.redirect(followUrl);
471471
}
472472

473-
const profileLink = webfingerData.links.find(
474-
(link) => link.rel === "http://webfinger.net/rel/profile-page",
475-
) as { href?: string } | undefined;
476-
477-
if (profileLink?.href) {
478-
const followerUsername = followerHandle.split("@")[0];
479-
const followUrl = profileLink.href.replace(
480-
`@${followerUsername}`,
481-
botHandle,
482-
);
483-
return c.redirect(followUrl);
484-
}
485-
486473
return c.json({
487474
error: "No follow link found in webfinger data",
488-
data: webfingerData,
489475
}, 400);
490476
} catch (error) {
491-
console.error("Follow request error:", error);
492477
if (error instanceof Error && error.message === "No followerHandle!") {
493478
return c.json({ error: "Follower handle is required." }, 400);
494479
}

0 commit comments

Comments
 (0)