Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions src/web/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1047,9 +1047,9 @@ <h2 class="font-bold text-base sm:text-lg truncate">{{ getChatName(selectedChat)
</a>
</div>

<!-- Text with clickable links -->
<!-- Text with clickable links (for albums, use caption from whichever message has it) -->
<div class="whitespace-pre-wrap break-words message-text"
v-html="linkifyText(msg.text)"></div>
v-html="linkifyText(getAlbumCaption(msg) || msg.text)"></div>

<!-- Reactions -->
<div v-if="msg.reactions && msg.reactions.length > 0" class="mt-2 flex flex-wrap gap-1.5">
Expand Down Expand Up @@ -2538,6 +2538,16 @@ <h3 class="text-sm font-medium text-gray-300 mb-3">Create Share Token</h3>
}
}

// For album messages, find the caption from any message in the group
const getAlbumCaption = (msg) => {
const groupedId = getGroupedId(msg)
if (!groupedId) return null
const album = getAlbumForMessage(msg)
if (!album) return null
const captionMsg = album.find(m => m.text && m.text.trim() !== '')
return captionMsg ? captionMsg.text : null
}

const isGroup = computed(() => {
return selectedChat.value && (selectedChat.value.type === 'group' || selectedChat.value.type === 'channel')
})
Expand Down Expand Up @@ -3648,6 +3658,7 @@ <h3 class="text-sm font-medium text-gray-300 mb-3">Create Share Token</h3>
isFirstInAlbum,
isHiddenAlbumMessage,
getAlbumGridClass,
getAlbumCaption,
getChatName,
getInitials,
formatDate,
Expand Down