Commit 59ef709f1969155915e9262936b04e549fae3cc2

Authored by Adhidarma Hadiwinoto
1 parent a2f63d7437
Exists in master and in 1 other branch webadmin

Bugfix on deteksi msgHead empty

Showing 1 changed file with 6 additions and 1 deletions Side-by-side Diff

... ... @@ -13,7 +13,7 @@ async function sendToModem(partner, msg, modem, parentXid) {
13 13 const xid = parentXid || uniqid();
14 14  
15 15 const [msgHead, msgTail] = messageSplitter(msg.trim(), 160);
16   - if (msgHead) {
  16 + if (!msgHead) {
17 17 return;
18 18 }
19 19  
... ... @@ -66,6 +66,11 @@ exports.send = async (partner, msg) => {
66 66 if (typeof msg !== 'string' || !msg.trim()) return;
67 67  
68 68 const xid = uniqid();
  69 + logger.info('TRANSPORT: Got CORE message to forward to EVO-CP', {
  70 + xid,
  71 + partner,
  72 + msg,
  73 + });
69 74  
70 75 const modem = modems.randomModem();
71 76 if (!modem) {