mattn / bsky

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

URL incorrectly taken into account in grapheme counts #17

Open Chilsort opened 7 months ago

Chilsort commented 7 months ago

Hello,

Thanks for the app!

I'm using bsky version 0.0.53.

When posting a message containing an URL, I noticed that all the symbols of the URL seem to be taken into account to determine whether the message is too long.

For instance

$ bsky post "Test: https://google.com?q=thisisaveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryveryverylongquery"
failed to create post: XRPC ERROR 400: InvalidRequest: Invalid app.bsky.feed.post record: Record/text must not be longer than 300 graphemes

However when posting this message directly from BlueSky, this works.

Thanks for your help!