From f1d3ac81896d32594450803bb7ac73930393f03c Mon Sep 17 00:00:00 2001 From: James Grugett Date: Thu, 17 Feb 2022 00:30:46 -0600 Subject: [PATCH] Increase char limit to 10k for answers. Preserve line breaks. --- functions/src/create-answer.ts | 2 +- web/components/answers-panel.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/src/create-answer.ts b/functions/src/create-answer.ts index 896dc953..1b6d5f2f 100644 --- a/functions/src/create-answer.ts +++ b/functions/src/create-answer.ts @@ -24,7 +24,7 @@ export const createAnswer = functions.runWith({ minInstances: 1 }).https.onCall( if (amount <= 0 || isNaN(amount) || !isFinite(amount)) return { status: 'error', message: 'Invalid amount' } - if (!text || typeof text !== 'string' || text.length > 1000) + if (!text || typeof text !== 'string' || text.length > 10000) return { status: 'error', message: 'Invalid text' } // Run as transaction to prevent race conditions. diff --git a/web/components/answers-panel.tsx b/web/components/answers-panel.tsx index ac2d643c..dd4dd936 100644 --- a/web/components/answers-panel.tsx +++ b/web/components/answers-panel.tsx @@ -126,7 +126,7 @@ function AnswerItem(props: { )} > -
{text}
+
{text}