mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
messages-recv,encode: Implement proper fixes
This commit is contained in:
@@ -171,7 +171,7 @@ const encodeBinaryNodeInner = (
|
||||
|
||||
for(const char of str) {
|
||||
const isInNibbleRange = char >= '0' && char <= '9'
|
||||
if(!isInNibbleRange && !(char >= 'A' && char <= 'F') && !(char >= 'a' && char <= 'f')) {
|
||||
if(!isInNibbleRange && !(char >= 'A' && char <= 'F')) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
@@ -189,6 +189,8 @@ const encodeBinaryNodeInner = (
|
||||
pushByte(tokenIndex.index)
|
||||
} else if(isNibble(str)) {
|
||||
writePackedBytes(str, 'nibble')
|
||||
} else if(isHex(str)) {
|
||||
writePackedBytes(str, 'hex')
|
||||
} else if(str) {
|
||||
const decodedJid = jidDecode(str)
|
||||
if(decodedJid) {
|
||||
|
||||
Reference in New Issue
Block a user