diff --git a/.changeset/happy-crabs-unite.md b/.changeset/happy-crabs-unite.md new file mode 100644 index 0000000..8f3bcb4 --- /dev/null +++ b/.changeset/happy-crabs-unite.md @@ -0,0 +1,5 @@ +--- +"sky-follower-bridge": patch +--- + +- fixed to work even if @ is in login handle name diff --git a/src/lib/bskyClient.ts b/src/lib/bskyClient.ts index 773e65f..f7f5a29 100644 --- a/src/lib/bskyClient.ts +++ b/src/lib/bskyClient.ts @@ -23,7 +23,10 @@ export class BskyClient { password, }: BskyLoginParams): Promise<BskyClient> { const client = new BskyClient(); - const {data} = await client.agent.login({ identifier, password }); + const {data} = await client.agent.login({ + identifier: identifier.replace(/^@/, ""), // if identifier is a handle name, @ is not required + password + }); client.me = { did: data.did, handle: data.handle, diff --git a/src/popup.tsx b/src/popup.tsx index 34cef8d..ec7289f 100644 --- a/src/popup.tsx +++ b/src/popup.tsx @@ -133,7 +133,7 @@ function IndexPopup() { </span> <input type="text" - placeholder="Bluesky login email or handle(without @)" + placeholder="Bluesky handle or login email" value={userId} onChange={(e) => setUserId(e.target.value)} className="input input-bordered input-sm w-full max-w-xs"