add missing event listeners

This commit is contained in:
liamcottle 2025-02-13 23:59:46 +13:00
parent b3611f58ee
commit 305ef81b01

View file

@ -383,6 +383,10 @@ class Connection extends EventEmitter {
reject();
}
// listen for events
this.once(Constants.ResponseCodes.Ok, onOk);
this.once(Constants.ResponseCodes.Err, onErr);
// compose message
const txtType = Constants.TxtTypes.Plain;
const senderTimestamp = Math.floor(Date.now() / 1000);