Require phone connection in required places

This commit is contained in:
Adhiraj Singh
2020-12-23 09:31:00 +05:30
parent 523f0341ed
commit bc3cb6c178
4 changed files with 18 additions and 7 deletions

View File

@@ -195,7 +195,7 @@ export class WAConnection extends EventEmitter {
/** Generic function for action, set queries */
async setQuery (nodes: WANode[], binaryTags: WATag = [WAMetric.group, WAFlag.ignore], tag?: string) {
const json = ['action', {epoch: this.msgCount.toString(), type: 'set'}, nodes]
const result = await this.query({ json, binaryTags, tag, expect200: true }) as Promise<{status: number}>
const result = await this.query({ json, binaryTags, tag, expect200: true, requiresPhoneConnection: true }) as Promise<{status: number}>
return result
}
/**