Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
🐛 Show participant name if it belongs to current user
Luke Vellab61494fef3d2
diff --git a/apps/web/src/trpc/routers/polls/participants.ts b/apps/web/src/trpc/routers/polls/participants.tsindex 1753a1cc6..4a3da00e0 100644--- a/apps/web/src/trpc/routers/polls/participants.ts+++ b/apps/web/src/trpc/routers/polls/participants.ts@@ -147,6 +147,11 @@ export const participants = router({ctx.user && (await hasPollAdminAccess(pollId, ctx.user.id));if (!isAdmin) {return participants.map((participant) => {+ // If the current user is the participant, return the participant+ if (ctx.user && participant.userId === ctx.user.id) {+ return participant;+ }+return {...participant,name: "Anonymous",