mirror of
https://github.com/cheveguerra/bot-whatsapp.git
synced 2026-04-17 19:26:23 +00:00
UUID memory without relation UUID DB
This commit is contained in:
18
packages/bot/io/methods/validateCtx.js
Normal file
18
packages/bot/io/methods/validateCtx.js
Normal file
@@ -0,0 +1,18 @@
|
||||
const { generateRef } = require('../../utils/hash')
|
||||
/**
|
||||
*
|
||||
* @param answer string
|
||||
* @param options {media:string, buttons:[], capture:true default false}
|
||||
* @returns
|
||||
*/
|
||||
const validateCtx = ({ body, from }) => {
|
||||
return {
|
||||
ref: generateRef(),
|
||||
keyword: null,
|
||||
answer: body,
|
||||
options: {},
|
||||
from,
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { validateCtx }
|
||||
Reference in New Issue
Block a user