-
Notifications
You must be signed in to change notification settings - Fork 239
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
feat: lemmy #56
feat: lemmy #56
Conversation
Thanks for this @Teqed Really great work, and really appreciate it! Can't wait for this to be ready to merge. Let me know if you need help with anything! |
@nanos Thank you for writing FediFetcher! 👍 Working: Context of posts seen in the timeline. get_all_known_context_urls was returning |
989ab44
to
b7ef2be
Compare
yeah, I must admit that I never truly understood that part 😆 it's something I just inherited from the original author, and never bothered to simplify / rewrite. |
Included are a few commits which help prevent FediFetcher from exiting ungracefully when encountering issues with unexpected types, missing properties, or unusual URLs. Not a comprehensive pass for robustness but a few spots that were helpful while writing this feature. For future federation features, it should be noted that Pixelfed profiles don't use a subdirectory in their path, ex. For federation with Kbin instances, there is the minor issue of similar profile URLs to Lemmy (ex.
Finally, included in these commits are the final pieces needed to backfill user profiles, followed communities, and "posts" from Lemmy. Testing has been done via GitHub action against my Mastodon v4.1.2+glitch instance which has content from relevant instances. |
Thanks for your hard word @Teqed ! This is a fairly large PR, so I'm going to go through that with a bit of a fine toothed comb over the weekend, but it does look solid on firsts glance.
Personally, I think relying on a specific sequence is totally acceptable here. Though I did think about using the |
This is a good idea and you inspired me to do some quick research: Making a request at A request for that JSON (2.0 schema here) gets you This gives me some more ideas on how to go about choosing API endpoints based on NodeInfo instead of URL parsing. I imagine that if you went this route, it'd be preferable to keep a cache of already-identified APIs so that you don't repeatedly make the same request in the same run. I may submit another PR if I find this worthwhile to do. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solid work. thanks so much!
Parses
/comment/
and/post/
URLs for comment IDs to use with getComment to obtain the parentpost_id
and then uses getComments to find all related comment URLs underap_id
.