diff --git a/src/routes/tools/[toolId]/+page.server.ts b/src/routes/tools/[toolId]/+page.server.ts index 0d225f50f4b..7c6b3f57cef 100644 --- a/src/routes/tools/[toolId]/+page.server.ts +++ b/src/routes/tools/[toolId]/+page.server.ts @@ -97,15 +97,15 @@ export const actions: Actions = { envPublic.PUBLIC_SHARE_PREFIX || `${envPublic.PUBLIC_ORIGIN || url.origin}${base}`; const toolUrl = `${prefixUrl}/tools/${params.toolId}`; - const tool = await collections.tools.findOne>( + const tool = await collections.tools.findOne>( { _id: new ObjectId(params.toolId) }, - { projection: { displayName: 1 } } + { projection: { displayName: 1, name: 1 } } ); const username = locals.user?.username; await sendSlack( - `🔴 Tool <${toolUrl}|${tool?.displayName}> reported by ${ + `🔴 Tool <${toolUrl}|${tool?.displayName ?? tool?.name}> reported by ${ username ? `` : "non-logged in user" }.\n\n> ${result.data}` );