add video

This commit is contained in:
lendry
2026-07-07 12:46:43 +03:00
parent 911e76f232
commit 1bd95fa99e
15 changed files with 626 additions and 42 deletions

View File

@@ -1,6 +1,6 @@
import { decryptBinary, decryptDirectMessage, encryptBinary, encryptDirectMessage } from '@/lib/e2e-crypto';
export type E2EMessageKind = 'text' | 'emoji' | 'image' | 'voice' | 'audio' | 'file';
export type E2EMessageKind = 'text' | 'emoji' | 'image' | 'voice' | 'audio' | 'video' | 'video_note' | 'file';
export interface E2EMessagePayload {
kind: E2EMessageKind;
@@ -44,6 +44,10 @@ export function e2eKindFromMessageType(type: string): E2EMessageKind {
return 'voice';
case 'AUDIO':
return 'audio';
case 'VIDEO':
return 'video';
case 'VIDEO_NOTE':
return 'video_note';
case 'FILE':
return 'file';
default:
@@ -64,6 +68,10 @@ export function readableE2EPayload(payload: E2EMessagePayload | null) {
return 'Аудио';
case 'image':
return 'Фото';
case 'video':
return 'Видео';
case 'video_note':
return 'Кружок';
case 'file':
return payload.fileName ?? 'Файл';
default: