-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request]: Add link embeds in ATProtoBluesky
#41
Comments
May I suggest a Swift Package to do the heavy lifting here? https://github.com/pzmudzinski/OpenGraphReader MIT licensed, and doesn't have any platform specific dependencies, so you should still be able to deploy to Linux. I think you want to avoid relying on a VPS-type situation here as much as possible! |
I'm curious to hear your thoughts as to why it would be best to avoid making a VPS solution. Are there any security concerns that I would be too annoying to deal with? Are there privacy concerns that I may need to worry about? Or is there something else I haven't considered? If it's due to simply making sure non-ATProtoKit clients aren't using the VPS, then that is a valid point, but it's something I'm willing to try to solve. But if there's something I haven't considered, then I'm okay with hearing the issues surrounding this. |
Unless I'm missing a consideration, the addition of a separate hosted server — with its attendant costs, configuration and maintenance burden — simply to provide website scanning services for one API endpoint in a framework, feels unnecessary. Anyone looking to deploy ATProtoKit who wanted to do website cards would, I feel, be put off by having to stand up a server just for that. And as for you taking on that cost on users' behalf? That feels unfair to you as well. Commercial users of your framework (people like me, though I could never do this) could take advantage of that generosity, if they could avoid the time and cost and bureaucratic headache of putting up a server. The bigger the company using ATProtoKit, the more likely they actually wouldn't be able to pass that hurdle, and the greater the damage to your own server! Meanwhile, in OpenGraphReader, we have an existing solution that does the necessary work: loads a webpage, scrapes the needed data out of it. The "cost" of that is borne by the application developer, where it belongs. Hope this helps! |
Okay, I didn't consider that. Fair enough then: I won't do it. I still feel like someone may want to set up a server and, therefore, I'm not opposed to making a small server application still. It just won't be a high or even medium priority. As for something like OpenGraphReader, this is fine, and I'll keep it in mind. |
This feature has been completed and will be available in version 0.20.0. This issue will now be closed. |
Wow, thanks Christopher! But I don't see a PR for this. Can you point to the code that closes this? |
I didn't make one. It's available in the That said, I'll have to make it more of a habit to create PRs. |
@MasterJ93 I note that your feature requires the client to derive the title, description and thumbnail image for the card. I note that even providing empty values for these yields a link card in Bluesky. I can live with this, thank you. Running the
The stack trace originates with my call to setup the configuration:
Hope you can determine the cause? |
|
@MasterJ93 I've since determined that the problem here was on my end: you can't initialize multiple instances of the logger, and that's what causes the crash. I have updated my own code to ensure the ATProtocolConfiguration is only initialized once, and that resolves it. I'm quite eager (or more accurately, holy cow my users are the eager ones!) to have this released so I can make it available! 🙏 |
Yes that, true: only one logger can be initialized, but I thought I changed that. Multiple I suppose that, for now, I'll need to make it where, if it sees that a logger instance is already initialized, then it should simply ignore trying to make any form of initialization. |
@MasterJ93 Just wanted to see how this work was going? I'm still getting regular complaints about this missing support from my users, so no pressure! 😅 I'm setup on my end to use your new API as soon as it's released... |
I want to get that completed by either today or tomorrow. It's mostly finishing touches and writing documentation at this point (as well as testing to make sure it works). |
@MasterJ93 I'm sorry to be that guy, but hoping for an update here? |
The |
The
and line 34, the error:
|
I'm going to reopen this issue until no other errors are found in relation to link embeds. As for the additional issue you found, I don't think it's related to link embeds, so please create another issue with respect to that so I can have that specific issue tracked. |
The
I haven't tested it yet; I've been awake for the past 36 hours or so. I'm going to bed and I'll continue fixing the warnings, test the implementation of |
I've gotten much further this time! But I'm hitting that old problem with the Logger again. Because I serialize and store account information, an |
The dreaded logger... 😓 I have an idea. It's an ugly hack, but it might work: an I'll build that tonight and hopefully it kills that problem once and for all. |
I pushed an update in the There was also a bug that caused ATProtoKit to crash if there were multiple And with that, I am hoping that there will be no more issues on this end. |
Fantastic! Will have to try this tomorrow; I'll let you know! |
I hope that, by this time tomorrow, baring any bugs, it should be out before this time tomorrow. I hope... |
What is hope, if not a projection out to the universe, wanting it to hold you accountable? What is this comment to you, if not the warm wishes of your number one fan, wondering how likely that release is today? 🙏 🌈 |
@MasterJ93 for what it's worth, the 🎉 |
I tested it a couple of hours ago and it's working fine on my end as well. I've also written some documentation and a DocC article on how to use it as well. As for your question:
In about five minutes: I just pushed everything to I assume that the other issues you had are no longer existing, so I'll close this, as well as the other ones you've opened, but let me know if that changes. |
Summary
Support for links should be embedded in the
ATProtoBluesky
class.Pain points
At the moment, link embeds are not available to be made when using
ATProtoBluesky.createPostRecord
.Considered Alternatives
No response
Is this a breaking change?
No
Library Examples
No response
Additional Context
The question at the moment is how to grab this information. The ultimate solution would probably be to make it so that the method responsible for implementing the embedded link to request this information. From what I understand so far, the following is required to be grabbed:
There may be services that can grab this information, or the client could be responsible with getting the link. Additionally, I could pay for a VPS dedicated for ATProtoKit clients to grab the links. If the latter happens, then this program should be made open source, but the VPS would be available for anyone using ATProtoKit. The question is how to ensure that the client is being used by ATProtoKit and not by any other client that wishes to get that information. This would be a mid-term goal.
The text was updated successfully, but these errors were encountered: