-
-
Notifications
You must be signed in to change notification settings - Fork 922
Provide federation context collection (fixes #5283) #5856
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
base: main
Are you sure you want to change the base?
Conversation
62a1012
to
be6b3ac
Compare
be6b3ac
to
ad3a12e
Compare
Hi @Nutomic! Some thoughts:
|
Done, items are sorted by id now (ie creation time).
Right I forgot about that, added it now.
This is already included, added an example above. Instead of any conditionals, for |
I'll have to think on this because having an inherited context allows for things like ownership and potentially paves the way for reply controls. But the simplicity of each comment providing its own context also makes sense. |
I could easily change it to set |
Thank you for your input, that makes sense. There isn't a specific recommendation for this right now so learning about the logic behind specific decisions is helpful. Inheriting context has some prior art, some existing software does it (Akkoma and some others), but there is no guarantee that if you declare a cross-origin context that your object actually exists in it. |
Actually with FEP-1b12 the community is authorative. Other instances may be missing comments (eg from instance blocks, user bans), or may have extra comments (eg if deletions didnt federate). So ideally it would serve a context url from the community instance. But that is not possible because when posting in a remote community, we dont know what the local post id will be there. The best option I can think of is an endpoint like |
I think that might introduce additional complexity that would hinder adoption. The way it is implemented in this PR now is compliant with 7888: you are declaring your own context. At the end of the day I think it is an implementor decision and context inheritance would likely be a separate, optional FEP. In this case, as you say, the community is authoritative. |
Adds a
context
field to federation data for posts and comments, which has a value likehttp://lemmy.ml/post/1/context
orhttp://lemmy.ml/comment/1/context
. Fetching this url gives a collection with all known comments in the given post, example post context from local testing:And comment context:
Requires #5855