diff --git a/keyserver/src/fetchers/link-fetchers.js b/keyserver/src/fetchers/link-fetchers.js --- a/keyserver/src/fetchers/link-fetchers.js +++ b/keyserver/src/fetchers/link-fetchers.js @@ -18,8 +18,8 @@ SELECT c.name, i.community AS communityID, m.role FROM invite_links i INNER JOIN threads c ON c.id = i.community - LEFT JOIN memberships m - ON m.thread = i.community AND m.user = ${viewer.userID} + LEFT JOIN memberships m ON m.thread = i.community + AND m.user = ${viewer.loggedIn ? viewer.userID : null} WHERE i.name = ${request.secret} AND c.community IS NULL `;