UNPKG

wingbot

Version:

Enterprise Messaging Bot Conversation Engine

12 lines (11 loc) 344 B
/** * @param {import('../../src/Request')} req * @param {import('../../src/Responder')} res */ module.exports = (req, res) => { const { action, data = {} } = req.expected() || {}; const current = res.currentAction(); if (!data._alreadySeen || action !== current) { res.expected(current, { _alreadySeen: true }); } };