mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
chore: format everything
This commit is contained in:
@@ -12,7 +12,7 @@ export class USyncStatusProtocol implements USyncQueryProtocol {
|
||||
getQueryElement(): BinaryNode {
|
||||
return {
|
||||
tag: 'status',
|
||||
attrs: {},
|
||||
attrs: {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,24 +21,24 @@ export class USyncStatusProtocol implements USyncQueryProtocol {
|
||||
}
|
||||
|
||||
parser(node: BinaryNode): StatusData | undefined {
|
||||
if(node.tag === 'status') {
|
||||
if (node.tag === 'status') {
|
||||
assertNodeErrorFree(node)
|
||||
let status: string | null = node?.content!.toString()
|
||||
const setAt = new Date(+(node?.attrs.t || 0) * 1000)
|
||||
if(!status) {
|
||||
if(+node.attrs?.code === 401) {
|
||||
if (!status) {
|
||||
if (+node.attrs?.code === 401) {
|
||||
status = ''
|
||||
} else {
|
||||
status = null
|
||||
}
|
||||
} else if(typeof status === 'string' && status.length === 0) {
|
||||
} else if (typeof status === 'string' && status.length === 0) {
|
||||
status = null
|
||||
}
|
||||
|
||||
return {
|
||||
status,
|
||||
setAt,
|
||||
setAt
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user