mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
Fix errors with Compilation (#515)
There were some erros which prevented the code to compile. This commit fixes that
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import {WAConnection as Base} from './4.Events'
|
||||
import { Presence, WABroadcastListInfo, WAProfilePictureChange, WALoadChatOptions, WAChatIndex, BlocklistUpdate } from './Constants'
|
||||
import { Presence, WABroadcastListInfo, WAProfilePictureChange, WALoadChatOptions, WAChatIndex, BlocklistUpdate, WABusinessProfile } from './Constants'
|
||||
import {
|
||||
WAMessage,
|
||||
WANode,
|
||||
@@ -87,12 +87,13 @@ export class WAConnection extends Base {
|
||||
delete profile.business_hours.config
|
||||
}
|
||||
const json = ['action', "editBusinessProfile", {...profile, v: 2}]
|
||||
let response;
|
||||
try {
|
||||
const response = await this.query({ json, expect200: true, requiresPhoneConnection: true }).catch(_ => throw new Error(_))
|
||||
response = await this.query({ json, expect200: true, requiresPhoneConnection: true })
|
||||
} catch (_) {
|
||||
return {status: 400}
|
||||
}
|
||||
return {status: response.status}
|
||||
return { status: response.status }
|
||||
}
|
||||
async updateProfileName (name: string) {
|
||||
const response = (await this.setQuery (
|
||||
|
||||
Reference in New Issue
Block a user