chore: format everything

This commit is contained in:
canove
2025-05-06 12:10:19 -03:00
parent 04afa20244
commit fa706d0b50
76 changed files with 8241 additions and 7142 deletions

View File

@@ -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
}
}
}
}
}