innocenzi / bluesky-notification-channel

Bluesky notification channel for the Laravel framework
MIT License
22 stars 3 forks source link

[Feature request] Add an embed using the provided link #4

Closed maciek-szn closed 3 days ago

maciek-szn commented 1 week ago

I've just discovered this package and I'm experimenting with it a bit. I've noticed that if the post content contains a link, it's automatically resolved and an embed is created. However, I don't see a way to simply add an embed without putting the link in the post content (this requires duplicating the functionality of getting the properties of the page behind the link, uploading a thumbnail, etc.). A good solution would be to add a "withLink" method (or something similar) to BlueskyPost, which would use the existing functionality of creating embeds.

innocenzi commented 1 week ago

If I understand correctly, you're looking for BlueskyPost#embed? You can add an instance of External here

maciek-szn commented 1 week ago

Yes, but if I'm not mistaken, in such a case I have to provide the website title, its description, and, above all, handle the upload of the thumbnail to Bluesky servers. However, if I insert a link into the content of the post, it happens automatically. That's why I suggest that it be possible to use the automatic mechanism for creating embeds that you have prepared without having to insert the link directly into the content of the post.

innocenzi commented 1 week ago

Ah, right

I'd accept a PR for that 👍

maciek-szn commented 1 week ago

I feel like I'm not experienced enough, but of course I'll try.

innocenzi commented 1 week ago

It would be a learning experience then. Happy to review PRs :)