diff --git a/config.sample.json b/config.sample.json index 5d35b5b..e52b109 100644 --- a/config.sample.json +++ b/config.sample.json @@ -11,6 +11,7 @@ "sleep_before_unlock_modem_ms": 1200, "ignore_prefix": false, "number_suffix": "", + "send_on_process_msg": false, "sender": { "url": "http://192.168.0.181:59194/service/sendsms", diff --git a/lib/transport.js b/lib/transport.js index b9c704a..654695d 100644 --- a/lib/transport.js +++ b/lib/transport.js @@ -84,7 +84,7 @@ exports.send = async (partner, msg) => { if (typeof partner !== 'string' || !partner.trim()) return; if (typeof msg !== 'string' || !msg.trim()) return; - if (msg.trim().search(/PROSES$/) >= 0) return; + if (!config.send_on_process_msg && (msg.trim().search(/PROSES$/) >= 0)) return; const xid = uniqid();