File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments