develop
HerrHase 2 years ago
parent d82c29f5cd
commit 44b02cdde2

@ -2,7 +2,7 @@ APP_DEBUG=false
APP_PORT=8510
APP_API_TOKEN=
APP_API_ALLOWED_PARSERS=kuma
APP_API_ALLOWED_PARSERS=kuma,text
XMPP_SERVICE=
XMPP_DOMAIN=

@ -0,0 +1,23 @@
import Parser from './parser.js'
import DOMPurify from 'isomorphic-dompurify'
/**
* Parser for "text" in Json, is used by slack
*
* @author Björn Hase, Tentakelfabrik
* @license hhttps://www.gnu.org/licenses/gpl-3.0.en.html GPL-3
* @link https://gitea.tentakelfabrik.de:tentakelfabrik/tellme-bot.git
*
*/
class Text extends Parser
{
parse()
{
// check for msg and clean it
if (this.body.text) {
this.message = DOMPurify.sanitize(this.body.text)
}
}
}
export default Text
Loading…
Cancel
Save