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): avoid emoji accidents when sending messages (#15854)
zxshend370e79237b7
diff --git a/react/features/base/react/components/web/Message.tsx b/react/features/base/react/components/web/Message.tsxindex 06c9f6c9a9..2a54473c4b 100644--- a/react/features/base/react/components/web/Message.tsx+++ b/react/features/base/react/components/web/Message.tsx@@ -54,7 +54,7 @@ class Message extends Component<IProps> {// Tokenize the text in order to avoid emoji substitution for URLsconst tokens = text ? text.split(' ') : [];- const content = [];+ const content: any[] = [];const { gifEnabled } = this.props;// check if the message is a GIF@@ -72,7 +72,11 @@ class Message extends Component<IProps> {// Bypass the emojification when urls or matrix ids are involvedcontent.push(token);} else {- content.push(...toArray(token, { className: 'smiley' }));+ const emojified = [ ...toArray(token, { className: 'smiley' }) ];++ content.push(+ ...emojified.some(item => typeof item === 'string') ? [ token ] : emojified+ );}content.push(' ');