mirror of
https://github.com/thelounge/thelounge
synced 2024-11-10 22:54:15 +00:00
64ebe0f437
- Load up to 5 previews per message (to avoid abuse) - Do not load multiple times the same URL - Prepare preview containers per message instead of appending (to maintain correct order) - Store an array of previews instead of a single preview in `Msg` objects - Consolidate preview rendering for new messages and upon refresh/load history (when rendering entire channels) - Update `parse` tests to reflect previous point - Add test for multiple URLs - Switch preview tests from `assert` API to `expect` API
11 lines
379 B
Smarty
11 lines
379 B
Smarty
<div class="msg {{type}}{{#if self}} self{{/if}}{{#if highlight}} highlight{{/if}}" id="msg-{{id}}" data-time="{{time}}" data-from="{{from}}">
|
|
<span class="time tooltipped tooltipped-e" aria-label="{{localetime time}}">
|
|
{{tz time}}
|
|
</span>
|
|
<span class="from">
|
|
{{#if from}}
|
|
{{> user_name nick=from}}
|
|
{{/if}}
|
|
</span>
|
|
<span class="text">{{{parse text}}}</span>
|
|
</div>
|