textFilter.js 783 B

12345678910111213141516171819202122232425262728293031
  1. 'use strict';
  2. const C = require('../config');
  3. const F = require('../common/function');
  4. const path = require('path');
  5. const _ = require('underscore');
  6. _.str = require('underscore.string');
  7. _.v = require('validator');
  8. var wordFilter = require('../libs/wordfilter');
  9. module.exports = function (app, commonManager) {
  10. let modelMap = app.model_mgr.model_map;
  11. let managerMap = commonManager.mgr_map;
  12. /**
  13. * 添加数据库长存定时器
  14. * @param timeout 多久后执行(毫秒)
  15. * @param key 要执行的cronjob映射名
  16. * @param data 执行时要用到的数据
  17. * @returns {{result: DBTimer id}}
  18. */
  19. this.scMatch = function* (message) {
  20. let check_word = yield wordFilter.scMatch(message);
  21. return check_word;
  22. };
  23. };