You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Receiving an error message when bot leaves a room. I believe the .catch on line 1966 is the root cause. Removing the catch stops the error from occurring.
TypeError: driver.forget.call(...).catch is not a function
at Flint.forgetByRoomId (/root/spaceman/node_modules/node-flint/lib/flint.js:1966:15)
at Flint.despawn (/root/spaceman/node_modules/node-flint/lib/flint.js:1758:10)
at Flint.onMembershipDeleted (/root/spaceman/node_modules/node-flint/lib/flint.js:1379:17)
at /root/spaceman/node_modules/node-flint/lib/webhook.js:142:22
at Layer.handle [as handle_request] (/root/spaceman/node_modules/express/lib/router/layer.js:95:5)
at next (/root/spaceman/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/root/spaceman/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/root/spaceman/node_modules/express/lib/router/layer.js:95:5)
at /root/spaceman/node_modules/express/lib/router/index.js:281:22
at Function.process_params (/root/spaceman/node_modules/express/lib/router/index.js:335:12)
at next (/root/spaceman/node_modules/express/lib/router/index.js:275:10)
at /root/spaceman/node_modules/body-parser/lib/read.js:130:5
at invokeCallback (/root/spaceman/node_modules/raw-body/index.js:224:16)
at done (/root/spaceman/node_modules/raw-body/index.js:213:7)
at IncomingMessage.onEnd (/root/spaceman/node_modules/raw-body/index.js:273:7)
at emitNone (events.js:106:13)
With the lines below commented out, the error does not occur. Do we need this .catch here if we are throwing an error further below in the else statement?>
// validate storage module forget() methodif(typeofdriver.forget==='function'){Bot.prototype.forget=function(key){varid=this.room.id;returndriver.forget.call(driver,id,key);};Flint.prototype.forgetByRoomId=function(roomId){returndriver.forget.call(driver,roomId)// .catch(err => {// // ignore errors when called by forgetByRoomId// return when(null);// });};}else{thrownewError('storage module missing forget() function');}
The text was updated successfully, but these errors were encountered:
Receiving an error message when bot leaves a room. I believe the .catch on line 1966 is the root cause. Removing the catch stops the error from occurring.
With the lines below commented out, the error does not occur. Do we need this .catch here if we are throwing an error further below in the else statement?>
The text was updated successfully, but these errors were encountered: