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:
Adhiraj Singh
2022-08-01 10:43:01 +05:30
parent 9c83cd96d2
commit 2549d10be9
22 changed files with 58772 additions and 55399 deletions

View File

@@ -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