From a5a61b0cb0bb271b523eeee44869b0d8ad79df49 Mon Sep 17 00:00:00 2001 From: Jeremy Kahn Date: Sat, 29 Oct 2022 13:25:31 -0500 Subject: [PATCH] feat: set messageTranscriptSizeLimit to 150 --- src/config/messaging.ts | 2 +- src/pages/About/About.tsx | 19 +++++++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/config/messaging.ts b/src/config/messaging.ts index eb42d02..6a34ed7 100644 --- a/src/config/messaging.ts +++ b/src/config/messaging.ts @@ -1,2 +1,2 @@ export const messageCharacterSizeLimit = 10_000 -export const messageTranscriptSizeLimit = 10_000 +export const messageTranscriptSizeLimit = 150 diff --git a/src/pages/About/About.tsx b/src/pages/About/About.tsx index f98f2df..6052656 100644 --- a/src/pages/About/About.tsx +++ b/src/pages/About/About.tsx @@ -3,10 +3,21 @@ import MuiMarkdown from 'mui-markdown' import Box from '@mui/material/Box' import { ShellContext } from 'contexts/ShellContext' -import { messageCharacterSizeLimit } from 'config/messaging' +import { + messageTranscriptSizeLimit, + messageCharacterSizeLimit, +} from 'config/messaging' import './index.sass' +const messageTranscriptSizeLimitFormatted = Intl.NumberFormat().format( + messageTranscriptSizeLimit +) + +const messageCharacterSizeLimitFormatted = Intl.NumberFormat().format( + messageCharacterSizeLimit +) + export const About = () => { const { setTitle } = useContext(ShellContext) @@ -40,13 +51,13 @@ Conversation transcripts are erased from local memory as soon as you close the p When a peer joins a **public** room with participants already in it, the new peer will automatically request the transcript of the conversation that has already taken place from the other peers. Once all peers leave the room, the conversation is completely erased. Peers joining a **private** room will not get the conversation transcript backfilled. +Chat transcript history is limited to ${messageTranscriptSizeLimitFormatted} messages for all rooms. + #### Message Authoring Chat messages support [GitHub-flavored Markdown](https://github.github.com/gfm/) with code syntax highlighting. -Press \`Enter\` to send a message. Press \`Shift + Enter\` to insert a line break. Message size is limited to ${Intl.NumberFormat().format( - messageCharacterSizeLimit - )} characters. +Press \`Enter\` to send a message. Press \`Shift + Enter\` to insert a line break. Message size is limited to ${messageCharacterSizeLimitFormatted} characters. `}