You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
710 B
33 lines
710 B
import Action from './../../packages/server/actions/action.js'
|
|
import XmppHelper from './../helpers/Xmpp.js'
|
|
|
|
/**
|
|
* Xmpp Message
|
|
*
|
|
* @author Björn Hase <me@herr-hase.wtf>
|
|
* @license http://opensource.org/licenses/MIT The MIT License
|
|
* @link https://git.node001.net/HerrHase/super-hog.git
|
|
*
|
|
*/
|
|
|
|
class Xmpp extends Action {
|
|
|
|
/**
|
|
*
|
|
*
|
|
*/
|
|
async run() {
|
|
const xmppHelper = new XmppHelper(
|
|
process.env.XMPP_SERVICE,
|
|
process.env.XMPP_DOMAIN,
|
|
process.env.XMPP_USERNAME,
|
|
process.env.XMPP_PASSWORD
|
|
)
|
|
|
|
await xmppHelper.sendToRoom(this.flow, process.env.XMPP_ROOM, this.data.message)
|
|
}
|
|
|
|
}
|
|
|
|
export default Xmpp
|