diff --git a/src/api/templates/contact.html b/src/api/templates/contact.html index d0c1a00..5105096 100644 --- a/src/api/templates/contact.html +++ b/src/api/templates/contact.html @@ -367,6 +367,15 @@ word-break: break-word; } + .chat-msg-bubble a { + color: inherit; + text-decoration: underline; + } + + .chat-msg.own .chat-msg-bubble a { + color: #fff; + } + .chat-msg.own .chat-msg-bubble { background: #0066cc; color: #fff; @@ -678,6 +687,10 @@ const ownNorm = norm(ownName); + function linkify(text) { + return text.replace(/(https?:\/\/[^\s<]+)/g, '$1'); + } + function renderMsg(m) { const isOwn = norm(m.sender_name) === ownNorm; const div = document.createElement("div"); @@ -687,7 +700,7 @@ if (!isOwn && total !== null && total > batchSize) { html += '