mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-14 12:47:47 +00:00
feat: make links in chat clickable
This commit is contained in:
committed by
Zoltan Bettenbuk
parent
e8eb7e1e1f
commit
bed3f62536
@@ -2,10 +2,10 @@
|
||||
|
||||
import React from 'react';
|
||||
import { toArray } from 'react-emoji-render';
|
||||
import Linkify from 'react-linkify';
|
||||
|
||||
|
||||
import { translate } from '../../../base/i18n';
|
||||
import { Linkify } from '../../../base/react';
|
||||
|
||||
import AbstractChatMessage, {
|
||||
type Props
|
||||
@@ -43,13 +43,7 @@ class ChatMessage extends AbstractChatMessage<Props> {
|
||||
|
||||
content.forEach(i => {
|
||||
if (typeof i === 'string') {
|
||||
processedMessage.push(
|
||||
<Linkify
|
||||
key = { i }
|
||||
properties = {{
|
||||
rel: 'noopener noreferrer',
|
||||
target: '_blank'
|
||||
}}>{ i }</Linkify>);
|
||||
processedMessage.push(<Linkify key = { i }>{ i }</Linkify>);
|
||||
} else {
|
||||
processedMessage.push(i);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user