Send and view photos in chats
- paperclip button and clipboard paste in the chat input, previews with remove, up to 10 photos per message (sent via REST multipart) - photos in message bubbles with reserved size, fullscreen viewer (arrows, swipe, Esc), fresh link when a presigned URL expires - chat list preview shows "Photo" for photo-only messages - keep the feed pinned to the bottom when the preview strip appears Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -63,7 +63,9 @@ 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 preview = getLastMessageText(chat) || t('chat.noMessages');
|
||||
// У сообщения только с фото текста нет — в превью пишем «Фото»
|
||||
const photoPreview = chat.lastMessageAttachments > 0 ? `📷 ${t('chat.photoPreview')}` : "";
|
||||
const preview = getLastMessageText(chat) || photoPreview || t('chat.noMessages');
|
||||
|
||||
return { title, imgSrc, emoji, unreadCount, preview };
|
||||
}
|
||||
Reference in New Issue
Block a user