Thanks Gene
I pushed my code in this Github repository in order to check out to see all I have done is correct.
I'd appreciate your concern to resolve the previously mentioned bug, after I added your new command, another issue showed up which is reported here:
(node:10769) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'deleteDatabase' of undefined
at /home/mobin/Documents/tinode_nodejs/node_modules/tinode-sdk/umd/tinode.prod.js:1:9905
at new Promise (<anonymous>)
at Object.deleteDatabase (/home/mobin/Documents/tinode_nodejs/node_modules/tinode-sdk/umd/tinode.prod.js:1:9875)
at new v (/home/mobin/Documents/tinode_nodejs/node_modules/tinode-sdk/umd/tinode.prod.js:1:38079)
at chat (/home/mobin/Documents/tinode_nodejs/index.js:19:20)
at Server.<anonymous> (/home/mobin/Documents/tinode_nodejs/index.js:10:5)
at Object.onceWrapper (events.js:481:28)
at Server.emit (events.js:375:28)
at emitListeningNT (net.js:1354:10)
at processTicksAndRejections (internal/process/task_queues.js:81:21)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:10769) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see
https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:10769) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
kind regards,