mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
fix(master): linting warnings
This commit is contained in:
@@ -42,7 +42,7 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
||||
return key
|
||||
}
|
||||
|
||||
const fetchPrivacySettings = async(force: boolean = false) => {
|
||||
const fetchPrivacySettings = async(force = false) => {
|
||||
if(!privacySettings || force) {
|
||||
const { content } = await query({
|
||||
tag: 'iq',
|
||||
@@ -540,7 +540,7 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
||||
const sendPresenceUpdate = async(type: WAPresence, toJid?: string) => {
|
||||
const me = authState.creds.me!
|
||||
if(type === 'available' || type === 'unavailable') {
|
||||
if(!me!.name) {
|
||||
if(!me.name) {
|
||||
logger.warn('no name present, ignoring presence update request...')
|
||||
return
|
||||
}
|
||||
@@ -550,7 +550,7 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
||||
await sendNode({
|
||||
tag: 'presence',
|
||||
attrs: {
|
||||
name: me!.name,
|
||||
name: me.name,
|
||||
type
|
||||
}
|
||||
})
|
||||
@@ -558,7 +558,7 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
||||
await sendNode({
|
||||
tag: 'chatstate',
|
||||
attrs: {
|
||||
from: me!.id!,
|
||||
from: me.id,
|
||||
to: toJid!,
|
||||
},
|
||||
content: [
|
||||
@@ -840,7 +840,7 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
||||
|
||||
// update our pushname too
|
||||
if(msg.key.fromMe && msg.pushName && authState.creds.me?.name !== msg.pushName) {
|
||||
ev.emit('creds.update', { me: { ...authState.creds.me!, name: msg.pushName! } })
|
||||
ev.emit('creds.update', { me: { ...authState.creds.me!, name: msg.pushName } })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user