Allow admins to resolve removed or deleted objects via API
Is there a reason why everyone isn't allowed to resolve removed comments? Removed comments are still returned by the API when you query the comment endpoint, but they can't be resolved directly with resolve_object
@Sjmarf If removed comments are returned when youre not a mod/admin thats a bug. Are you using the latest release?
@Nutomic
I tried it on sh.itjust.works (0.19.5) and lemmy.ml (0.19.6-beta1). On both instances I can use the comment endpoint to get a removed comment like so:
https://sh.itjust.works/api/v3/comment?id=14436827
But I can't use resolve_object:
https://sh.itjust.works/api/v3/resolve_object?q=https://sh.itjust.works/comment/14436827
Is this limitation intentional? It seems to me that they should either both return the object, or neither should return the object. When the comment is local this isn't a huge issue because the comment endpoint can be used instead of resolve_object, but it gets tricky when I'm trying to resolve an object from a non-local instance.
with the changes in this PR comments will be resolvable by users as well, as the additional check within the resolve api no longer exists, and it just uses the underlying check when retrieving the comment.
only comment metadata is returned though, not comment contents, which is the same way it works on the comment api.
@Nothing4You bump on this one: https://github.com/Nothing4You/lemmy/pull/5 , then we can approve and merge this.
merged to unblock this PR, refactoring can then be done separately