mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
socket, binary, usync: fix linting
This commit is contained in:
@@ -522,7 +522,7 @@ export const makeMessagesSocket = (config: SocketConfig) => {
|
|||||||
const stanza: BinaryNode = {
|
const stanza: BinaryNode = {
|
||||||
tag: 'message',
|
tag: 'message',
|
||||||
attrs: {
|
attrs: {
|
||||||
id: msgId!,
|
id: msgId,
|
||||||
type: getMessageType(message),
|
type: getMessageType(message),
|
||||||
...(additionalAttributes || {})
|
...(additionalAttributes || {})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { BinaryNode } from './types'
|
|||||||
|
|
||||||
export const getBinaryNodeChildren = (node: BinaryNode | undefined, childTag: string) => {
|
export const getBinaryNodeChildren = (node: BinaryNode | undefined, childTag: string) => {
|
||||||
if(Array.isArray(node?.content)) {
|
if(Array.isArray(node?.content)) {
|
||||||
return node!.content.filter(item => item.tag === childTag)
|
return node.content.filter(item => item.tag === childTag)
|
||||||
}
|
}
|
||||||
|
|
||||||
return []
|
return []
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export class USyncDeviceProtocol implements USyncQueryProtocol {
|
|||||||
const keyIndexNode = getBinaryNodeChild(node, 'key-index-list')
|
const keyIndexNode = getBinaryNodeChild(node, 'key-index-list')
|
||||||
|
|
||||||
if(Array.isArray(deviceListNode?.content)) {
|
if(Array.isArray(deviceListNode?.content)) {
|
||||||
for(const { tag, attrs } of deviceListNode!.content) {
|
for(const { tag, attrs } of deviceListNode.content) {
|
||||||
const id = +attrs.id
|
const id = +attrs.id
|
||||||
const keyIndex = +attrs['key-index']
|
const keyIndex = +attrs['key-index']
|
||||||
if(tag === 'device') {
|
if(tag === 'device') {
|
||||||
|
|||||||
Reference in New Issue
Block a user