send, usync: fix lid Usync (including onWhatsApp), and send phash

This commit is contained in:
Rajeh Taher
2025-09-14 21:35:13 +03:00
parent 8029446511
commit 42c980778e
3 changed files with 30 additions and 8 deletions
+10 -2
View File
@@ -1,5 +1,6 @@
import type { USyncQueryProtocol } from '../../Types/USync'
import type { BinaryNode } from '../../WABinary'
import type { USyncUser } from '../USyncUser'
export class USyncLIDProtocol implements USyncQueryProtocol {
name = 'lid'
@@ -11,8 +12,15 @@ export class USyncLIDProtocol implements USyncQueryProtocol {
}
}
getUserElement(): null {
return null
getUserElement(user: USyncUser): BinaryNode | null {
if (user.lid) {
return {
tag: 'lid',
attrs: { jid: user.lid }
}
} else {
return null
}
}
parser(node: BinaryNode): string | null {