updated WAMessage definitions

This commit is contained in:
Adhiraj
2020-09-08 21:58:39 +05:30
parent fab5c269ef
commit 6e22ceac98
8 changed files with 14976 additions and 10661 deletions

View File

@@ -111,7 +111,7 @@ export default class Decoder {
readString(tag: number): string {
if (tag >= 3 && tag <= 235) {
const token = this.getToken(tag)
return token === 's.whatsapp.net' ? 'c.us' : token
return token// === 's.whatsapp.net' ? 'c.us' : token
}
switch (tag) {
@@ -131,7 +131,7 @@ export default class Decoder {
case WA.Tags.JID_PAIR:
const i = this.readString(this.readByte())
const j = this.readString(this.readByte())
if (i && j) {
if (typeof i === 'string' && j) {
return i + '@' + j
}
throw new Error('invalid jid pair: ' + i + ', ' + j)