Fix export issue

This commit is contained in:
Adhiraj
2020-08-03 17:22:29 +05:30
parent c121d17c12
commit e915342eed
2 changed files with 5 additions and 4 deletions

View File

@@ -100,7 +100,7 @@ export interface MessageStatusUpdate {
/** Message IDs read/delivered */
ids: string[]
/** Status of the Message IDs */
type: proto.WebMessageInfo.WEB_MESSAGE_INFO_STATUS
type: WA_MESSAGE_STATUS_TYPE
}
export enum GroupSettingChange {
messageSend = 'announcement',
@@ -139,8 +139,8 @@ export interface WALocationMessage {
degreesLongitude: number
address?: string
}
export const WA_MESSAGE_STUB_TYPE = proto.WebMessageInfo.WEB_MESSAGE_INFO_STUBTYPE
export const WA_MESSAGE_STATUS_TYPE = proto.WebMessageInfo.WEB_MESSAGE_INFO_STATUS
export import WA_MESSAGE_STUB_TYPE = proto.WebMessageInfo.WEB_MESSAGE_INFO_STUBTYPE
export import WA_MESSAGE_STATUS_TYPE = proto.WebMessageInfo.WEB_MESSAGE_INFO_STATUS
/** Reverse stub type dictionary */
export const WAMessageType = function () {

View File

@@ -37,6 +37,7 @@ console.log ('parsing ' + wsMessages.length + ' messages')
const list = wsMessages.map ((item, i) => {
const buffer = Buffer.from (item.data, 'base64')
try {
const [tag, json, binaryTags] = decrypt (buffer)
return {tag, json: JSON.stringify(json), binaryTags}
} catch (error) {
@@ -44,7 +45,7 @@ const list = wsMessages.map ((item, i) => {
const [tag, json, binaryTags] = decrypt (item.data)
return {tag, json: JSON.stringify(json), binaryTags}
} catch (error) {
console.log ('error in decoding: ' + error)
console.log ('error in decoding: ' + item.data + ': ' + error)
return null
}