Support links in chat messages

This commit is contained in:
Daniel Brendel
2025-01-04 15:35:00 +01:00
parent 2ce1a8eae9
commit 3c1cef29e9
4 changed files with 11 additions and 3 deletions

View File

@@ -89,7 +89,7 @@ class ChatController extends BaseController {
'id' => $message->get('id'),
'userId' => $message->get('userId'),
'userName' => UserModel::getNameById($message->get('userId')),
'message' => $message->get('message'),
'message' => UtilsModule::translateURLs($message->get('message')),
'system' => $message->get('sysmsg'),
'chatcolor' => UserModel::getChatColorForUser($message->get('userId')),
'created_at' => date('Y-m-h H:i', strtotime($message->get('created_at'))),

View File

@@ -2233,6 +2233,14 @@ fieldset .field {
color: rgb(255, 255, 255);
}
.chat-message-content a {
color: rgb(111, 185, 235);
}
.chat-message-content a:hover {
text-decoration: underline;
}
.chat-message-info {
position: relative;
margin-top: 10px;

View File

@@ -49,7 +49,7 @@
</div>
<div class="chat-message-content">
<pre>{{ $message->get('message') }}</pre>
<pre>{!! UtilsModule::translateURLs($message->get('message')) !!}</pre>
</div>
<div class="chat-message-info">

2
public/js/app.js vendored

File diff suppressed because one or more lines are too long