Merge pull request #1090 from Hexastack/feature/add-url-autolinking-to-sent-messages
Some checks failed
Build and Push Docker API Image / build-and-push (push) Has been cancelled
Build and Push Docker Base Image / build-and-push (push) Has been cancelled
Build and Push Docker UI Image / build-and-push (push) Has been cancelled

Update autoLink logic to process all message directions consistently
This commit is contained in:
Med Marrouchi
2025-06-03 15:50:30 +01:00
committed by GitHub

View File

@@ -24,11 +24,10 @@ const TextMessage: React.FC<TextMessageProps> = ({ message }) => {
useEffect(() => {
autoLink();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [message]);
const autoLink = () => {
if (message.direction === Direction.received && messageTextRef.current) {
if (messageTextRef.current) {
const text = messageTextRef.current.innerText;
messageTextRef.current.innerHTML = Autolinker.link(text, {