mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
chore: lint
This commit is contained in:
@@ -245,8 +245,10 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
|||||||
const website = getBinaryNodeChild(profiles, 'website')
|
const website = getBinaryNodeChild(profiles, 'website')
|
||||||
const email = getBinaryNodeChild(profiles, 'email')
|
const email = getBinaryNodeChild(profiles, 'email')
|
||||||
const category = getBinaryNodeChild(getBinaryNodeChild(profiles, 'categories'), 'category')
|
const category = getBinaryNodeChild(getBinaryNodeChild(profiles, 'categories'), 'category')
|
||||||
const business_hours = getBinaryNodeChild(profiles, 'business_hours')
|
const businessHours = getBinaryNodeChild(profiles, 'business_hours')
|
||||||
const business_hours_config = business_hours && getBinaryNodeChildren(business_hours, 'business_hours_config')
|
const businessHoursConfig = businessHours
|
||||||
|
? getBinaryNodeChildren(businessHours, 'business_hours_config')
|
||||||
|
: undefined
|
||||||
const websiteStr = website?.content?.toString()
|
const websiteStr = website?.content?.toString()
|
||||||
return {
|
return {
|
||||||
wid: profiles.attrs?.jid,
|
wid: profiles.attrs?.jid,
|
||||||
@@ -255,9 +257,9 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
|||||||
website: websiteStr ? [websiteStr] : [],
|
website: websiteStr ? [websiteStr] : [],
|
||||||
email: email?.content?.toString(),
|
email: email?.content?.toString(),
|
||||||
category: category?.content?.toString(),
|
category: category?.content?.toString(),
|
||||||
business_hours: {
|
'business_hours': {
|
||||||
timezone: business_hours?.attrs?.timezone,
|
timezone: businessHours?.attrs?.timezone,
|
||||||
business_config: business_hours_config?.map(({ attrs }) => attrs as unknown as WABusinessHoursConfig)
|
'business_config': businessHoursConfig?.map(({ attrs }) => attrs as unknown as WABusinessHoursConfig)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -599,7 +601,7 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
|||||||
attrs: {
|
attrs: {
|
||||||
name,
|
name,
|
||||||
version: (state.version - 1).toString(),
|
version: (state.version - 1).toString(),
|
||||||
return_snapshot: 'false'
|
'return_snapshot': 'false'
|
||||||
},
|
},
|
||||||
content: [
|
content: [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user