Trigger function from middleware
I am using the following code to reset the dialog state but I would also like to clear the session.userData at the same time. Is it possible to trigger another function that executes when a user types 'reset'?
// Anytime the major version is incremented any existing conversations will be restarted. bot.use(builder.Middleware.dialogVersion({ version: 1.0, resetCommand: /^reset/i }));
Yes, you might consider a trigger action attached to the root dialog that recognizes the reset command and takes your desired action.
Hi @suvamsh, were you able to figure this out?
Closing for now. Let us know if you could not figure this out.