mattn / bsky

A cli application for bluesky social
269 stars 26 forks source link

Fix 'bsky update-profile' command to handle profile updates correctly #22

Closed yebityon closed 6 months ago

yebityon commented 6 months ago

Problem Description

The bsky update-profile command is currently not functioning as expected. When attempting to update the profile with a new name, an error message is returned, indicating an "InvalidSwap" issue. This problem occurs not only when updating the name, but also when updating the description, avatar, and banner.

here is the example

>  ~/go/bin/bsky update-profile "new name"                  
cannot update profile: XRPC ERROR 400: InvalidSwap: Record was at bafyreidm72txz6wxhqjcdhtyfyvljysehxp56yvyifsryiwvaiptekgcdm

PR Description

This PR aims to fix the issues with the bsky update-profile command. The changes introduced in this PR are as follows:

The creation of this PR was guided by references to upsertProfile and here. The update-profile command has been tested locally and appears to be functioning correctly.

As I'm not a regular Go developer, please feel free to adjust anything that seems out of place. Lastly, thank you for this fantastic CLI tool 🚀.

mattn commented 6 months ago

Thank you