Implement conversation snapshot structure

This commit is contained in:
josedario87
2025-06-05 14:25:20 -06:00
parent 9acb48bb29
commit 624d06530e
3 changed files with 136 additions and 14 deletions

View File

@@ -193,10 +193,35 @@ export interface WhatsAppMessage {
text: string;
}
export interface Participant {
id: string;
name: string;
isMe: boolean;
isAdmin?: boolean;
}
export interface Msg {
id: string;
from: string;
to: string;
ts: number;
type: 'chat' | 'image' | 'audio' | 'sticker' | 'doc';
text?: string;
mediaUrl?: string;
mentions?: string[];
meta: {
ack: number;
hasReaction: boolean;
isQuoted: boolean;
};
}
export interface Conversation {
chatId: string;
messages: WhatsAppMessage[];
title: string;
isGroup: boolean;
unreadCount: number;
participants: Participant[];
messages: Msg[];
createdAt: number;
updatedAt: number;
messageCount: number;
}