Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
logVerbosityLevel: verbosity,
jsLogVerbosityLevel: jsVerbosity,
mode: mode, // 'wasm-streaming'/'wasm'/'asmjs'
prefix: useTestDC ? 'tdlib_test' : 'tdlib',
readOnly: readOnly,
isBackground: false,
useDatabase: useDatabase,
wasmUrl: `${WASM_FILE_NAME}?_sw-precache=${WASM_FILE_HASH}`
// onUpdate: update => this.emit('update', update)
};
console.log(
`[TdLibController] (fast_updating=${fastUpdating}) Start client with params=${JSON.stringify(options)}`
);
this.client = new TdClient(options);
this.client.onUpdate = update => {
if (!this.disableLog) {
if (update['@type'] === 'updateFile') {
console.log('receive updateFile file_id=' + update.file.id, update);
} else {
console.log('receive update', update);
}
}
this.emit('update', update);
};
});
};