Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
fix(chat): stop cutting web chat messages at 500 characters
damencho052a6544ca08
diff --git a/react/features/chat/components/web/ChatInput.tsx b/react/features/chat/components/web/ChatInput.tsxindex 51f5216fad..926f2c92a6 100644--- a/react/features/chat/components/web/ChatInput.tsx+++ b/react/features/chat/components/web/ChatInput.tsx@@ -10,7 +10,7 @@ import { translate } from '../../../base/i18n/functions';import { IconFaceSmile, IconSend } from '../../../base/icons/svg';import Button from '../../../base/ui/components/web/Button';import Input from '../../../base/ui/components/web/Input';-import { CHAR_LIMIT, CHAT_SIZE } from '../../constants';+import { CHAT_SIZE } from '../../constants';import { areSmileysDisabled, isSendGroupChatDisabled, isSendPrivateChatDisabled } from '../../functions';import { IMessage } from '../../types';@@ -270,7 +270,7 @@ class ChatInput extends Component<IProps, IState> {return;}- const trimmed = this.state.message.trim().slice(0, CHAR_LIMIT);+ const trimmed = this.state.message.trim();if (trimmed) {onSend(trimmed);@@ -335,7 +335,7 @@ class ChatInput extends Component<IProps, IState> {* @returns {void}*/_onMessageChange(value: string) {- this.setState({ message: value.slice(0, CHAR_LIMIT) });+ this.setState({ message: value });}/**diff --git a/react/features/chat/middleware.ts b/react/features/chat/middleware.tsindex e421de0730..2cbc693d74 100644--- a/react/features/chat/middleware.ts+++ b/react/features/chat/middleware.ts@@ -164,7 +164,7 @@ MiddlewareRegistry.register(store => next => action => {// source for it is the MESSAGE_MODERATED event from the server (XEP-0425).// This endpoint message path only exists so participants can bring late joiners// up to date, so honour it just for senders that hold the moderator role, and- // cap the reason the same way an edit is capped.+ // cap the reason.if (participant?.isModerator?.()) {_onMessageModerated(store,@@ -460,7 +460,7 @@ MiddlewareRegistry.register(store => next => action => {&& messageToEdit.messageType === MESSAGE_TYPE_LOCAL&& !messageToEdit.isFromVisitor) {- const trimmedMessage = String(action.message).trim().slice(0, CHAR_LIMIT);+ const trimmedMessage = String(action.message).trim();if (messageToEdit.privateMessage && messageToEdit.recipientId) {conference.sendMessageCorrection(@@ -657,7 +657,7 @@ function _addChatMsgListener(conference: IJitsiConference, store: IStore) {(participantId: string, messageId: string, message: string, timestamp?: string) => {store.dispatch(editMessage({messageId,- message: String(message).slice(0, CHAR_LIMIT),+ message: String(message),editedAt: timestamp ? new Date(timestamp).getTime() : Date.now(),participantId}));