send, usync: fix lid Usync (including onWhatsApp), and send phash
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user