From 6b98b8ce3b3e2246b274c09d51ed992a09b20849 Mon Sep 17 00:00:00 2001 From: Maksymilian Tomczyk Date: Tue, 11 Jun 2019 01:21:48 +0200 Subject: [PATCH] New method for Powerbot CMS needs --- models/Sender.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/models/Sender.js b/models/Sender.js index aec6a8e..be2eb7c 100644 --- a/models/Sender.js +++ b/models/Sender.js @@ -24,6 +24,17 @@ class Sender { this.emitter = emitter that = this } + + async rawNoWait(message) { + try { + const response = axios.post(this.api_url, message) + this.emitter.emit('request_outgoing', message, response) + this.emitter.emit('message_sent', message, response) + return response + } catch (e) { + throw createError(e) + } + } async raw(message) { try {