Send and play videos in chats
- the attach button accepts one video per message (MP4, MOV, WebM, 3GP); type, size (100 MB) and duration (60 s) are checked before upload - the video is uploaded straight to storage with a progress indicator, then confirmed; the message shows "processing" until the server pushes the ready (or failed) version over WebSocket - player with poster and duration in bubbles; fresh links when they expire - chat list preview shows "Video" for video-only messages Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -63,8 +63,10 @@ export function getChatDisplayInfo(chat, post, unreadMap, t) {
|
||||
const imgSrc = getImageUrl(post?.images?.[0]);
|
||||
const emoji = post?.emoji;
|
||||
const unreadCount = unreadMap[chat.id] ?? chat.unreadCount ?? chat.unreadMessages ?? 0;
|
||||
// У сообщения только с фото текста нет — в превью пишем «Фото»
|
||||
const photoPreview = chat.lastMessageAttachments > 0 ? `📷 ${t('chat.photoPreview')}` : "";
|
||||
// У сообщения только с фото или видео текста нет — в превью пишем «Фото»/«Видео»
|
||||
const photoPreview = chat.lastMessageAttachments > 0
|
||||
? (chat.lastMessageAttachmentKind === "VIDEO" ? `🎬 ${t('chat.videoPreview')}` : `📷 ${t('chat.photoPreview')}`)
|
||||
: "";
|
||||
const preview = getLastMessageText(chat) || photoPreview || t('chat.noMessages');
|
||||
|
||||
return { title, imgSrc, emoji, unreadCount, preview };
|
||||
|
||||
Reference in New Issue
Block a user