refactor: use the proto UserReceipt instead of custom MessageInfo

This commit is contained in:
Adhiraj Singh
2022-01-22 00:27:00 +05:30
parent 284c7e7812
commit 92587bd46a
4 changed files with 51 additions and 39 deletions

View File

@@ -166,14 +166,10 @@ export type MessageGenerationOptions = MessageContentGenerationOptions & Message
export type MessageUpdateType = 'append' | 'notify' | 'replace'
export type MessageInfoEventMap = { [jid: string]: Date }
export interface MessageInfo {
reads: MessageInfoEventMap
deliveries: MessageInfoEventMap
}
export type MessageUserReceipt = proto.IUserReceipt
export type WAMessageUpdate = { update: Partial<WAMessage>, key: proto.IMessageKey }
export type WAMessageCursor = { before: WAMessageKey | undefined } | { after: WAMessageKey | undefined }
export type MessageInfoUpdate = { key: proto.IMessageKey, update: Partial<MessageInfo> }
export type MessageUserReceiptUpdate = { key: proto.IMessageKey, receipt: MessageUserReceipt }