pathetische scheiße

This commit is contained in:
2026-07-17 00:09:44 +02:00
parent 266068b4b4
commit b27d85aa27

View File

@@ -453,7 +453,22 @@
const renderActivityItem = (c) => { const renderActivityItem = (c) => {
const rawContent = c.content || c.body || ''; const rawContent = c.content || c.body || '';
const displayContent = renderCommentContent(rawContent, c.id, c.item_id); let displayContent = renderCommentContent(rawContent, c.id, c.item_id);
displayContent = window.f0cklib?.processMentions ? window.f0cklib.processMentions(displayContent) : displayContent;
// Robust fallback for is_long if server didn't provide it, plus inline media checks
let isLong = c.is_long;
if (isLong === undefined) {
isLong = rawContent.length > 120
|| rawContent.split('\n').length > 2
|| (c.files && c.files.length > 0);
}
// Always force isLong if there are inline media tags that expand vertically
if (!isLong && (/\[(video|audio|youtube|img)\]|!\[|https?:\/\//i.test(rawContent) || displayContent.includes('<video'))) {
isLong = true;
}
const attachmentsHtml = renderCommentAttachments(c.files, rawContent); const attachmentsHtml = renderCommentAttachments(c.files, rawContent);
const pollHtml = renderSidebarPoll(c.poll, c.id, c.item_id); const pollHtml = renderSidebarPoll(c.poll, c.id, c.item_id);