From f159c8269ecd985412dfa6235ee4db799b819212 Mon Sep 17 00:00:00 2001 From: Riccardo Balbo Date: Mon, 25 Nov 2024 21:54:11 +0100 Subject: [PATCH] show invite description only to the owner --- api/resolvers/invite.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/resolvers/invite.js b/api/resolvers/invite.js index af3a7c9c3..c8f81dfd7 100644 --- a/api/resolvers/invite.js +++ b/api/resolvers/invite.js @@ -77,6 +77,9 @@ export default { poor: async (invite, args, { me, models }) => { const user = await models.user.findUnique({ where: { id: invite.userId } }) return msatsToSats(user.msats) < invite.gift + }, + description: (invite, args, { me }) => { + return invite.userId === me?.id ? invite.description : undefined } } }