mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
feat: update proto
The new proto extract has a bunch of breaking changes, so if you were using the raw proto in your code somewhere -- then you may have to update your code to make it work with the new proto !BREAKING_CHANGE
This commit is contained in:
@@ -262,10 +262,10 @@ export const generateMdTagPrefix = () => {
|
||||
return `${bytes.readUInt16BE()}.${bytes.readUInt16BE(2)}-`
|
||||
}
|
||||
|
||||
const STATUS_MAP: { [_: string]: proto.WebMessageInfo.WebMessageInfoStatus } = {
|
||||
'played': proto.WebMessageInfo.WebMessageInfoStatus.PLAYED,
|
||||
'read': proto.WebMessageInfo.WebMessageInfoStatus.READ,
|
||||
'read-self': proto.WebMessageInfo.WebMessageInfoStatus.READ
|
||||
const STATUS_MAP: { [_: string]: proto.WebMessageInfo.Status } = {
|
||||
'played': proto.WebMessageInfo.Status.PLAYED,
|
||||
'read': proto.WebMessageInfo.Status.READ,
|
||||
'read-self': proto.WebMessageInfo.Status.READ
|
||||
}
|
||||
/**
|
||||
* Given a type of receipt, returns what the new status of the message should be
|
||||
@@ -274,7 +274,7 @@ const STATUS_MAP: { [_: string]: proto.WebMessageInfo.WebMessageInfoStatus } = {
|
||||
export const getStatusFromReceiptType = (type: string | undefined) => {
|
||||
const status = STATUS_MAP[type!]
|
||||
if(typeof type === 'undefined') {
|
||||
return proto.WebMessageInfo.WebMessageInfoStatus.DELIVERY_ACK
|
||||
return proto.WebMessageInfo.Status.DELIVERY_ACK
|
||||
}
|
||||
|
||||
return status
|
||||
|
||||
Reference in New Issue
Block a user