I am not sure why the condition in comments service:
if (!currentUser) { options.relations = { crag: true, }; options.where['crag'] = { isHidden: false, }; }
was even added as comments can only be accessed via crag, via route, via latestComments query, which all already take care of publish status and isHidden status.
(even if we kept this condition it is wrong, as it only takes crag comments into account and fails for route comments --> bug symptom)
Removed some other related unnecessary code.
Might have missed something though, so pls test :)
Comments were not being shown for guest users at all (except on home page). Comment previews were also not being loaded on route list.
There was a bug introduced with https://github.com/plezanje-net/api/pull/147 (linked to: https://github.com/plezanje-net/web/pull/439)
I am not sure why the condition in comments service:
if (!currentUser) { options.relations = { crag: true, }; options.where['crag'] = { isHidden: false, }; }
was even added as comments can only be accessed via crag, via route, via latestComments query, which all already take care of publish status and isHidden status. (even if we kept this condition it is wrong, as it only takes crag comments into account and fails for route comments --> bug symptom)Removed some other related unnecessary code.
Might have missed something though, so pls test :)