mattn / bsky

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

URL string is not converted into link #16

Closed hyuki closed 8 months ago

hyuki commented 8 months ago

When text containing a URL is posted, the part of the string that is the URL does not turn into a link.

However, thumbnail images do appear and become links (normal behavior).

This issue persists regardless of whether the text's line breaks are LF or CR LF.

sample.txt:

This is a test.

https://example.com

session:

$ sw_vers
ProductName:        macOS
ProductVersion:     14.1.2
BuildVersion:       23B92
$ go install github.com/mattn/bsky@latest
$ bsky --version
bsky version 0.0.52
$ bsky login HANDLE PASSWORD
$ cat sample.txt | bsky post --stdin

result:

image

refer:

https://bsky.app/profile/hyuki.net/post/3kgryojjwcg2x

hyuki commented 8 months ago

sample.txt

hyuki commented 8 months ago

I received information stating, "Links will not be added unless link information is attached to facets. Therefore, it is necessary to parse the text and specify where the links are located."

cf. https://github.com/bluesky-social/atproto/blob/main/lexicons/app/bsky/feed/post.json#L19-L22

mattn commented 8 months ago

ひとまず修正を入れました。

https://bsky.app/profile/mattn.bsky.social/post/3kgt4v4llow2g

https://bsky.app/profile/mattn.bsky.social/post/3kgt4yokjut2l

しばらく触ってちゃんと動いてそうならマージします。