usync: add lid protocol
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { USyncQueryProtocol } from '../../Types/USync'
|
||||
import { BinaryNode } from '../../WABinary'
|
||||
|
||||
export class USyncLIDProtocol implements USyncQueryProtocol {
|
||||
name = 'lid'
|
||||
|
||||
getQueryElement(): BinaryNode {
|
||||
return {
|
||||
tag: 'lid',
|
||||
attrs: {},
|
||||
}
|
||||
}
|
||||
|
||||
getUserElement(): null {
|
||||
return null
|
||||
}
|
||||
|
||||
parser(node: BinaryNode): string | null {
|
||||
if(node.tag === 'lid') {
|
||||
return node.attrs.val
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user