From 2c0267adf1511a87c7bc08df08153417a1006dde Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Wed, 13 Apr 2016 21:38:45 -0600 Subject: [PATCH] Fix assert when looking for MSGID --- core/scanner_tossers/ftn_bso.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/core/scanner_tossers/ftn_bso.js b/core/scanner_tossers/ftn_bso.js index d1a14f79..e9de2147 100644 --- a/core/scanner_tossers/ftn_bso.js +++ b/core/scanner_tossers/ftn_bso.js @@ -383,10 +383,9 @@ function FTNMessageScanTossModule() { return cb(null); // nothing to do } - Message.getMetaValuesByMessageId(message.replyToMsgId, 'FtnKludge', 'MSGID', (err, msgIdVal) => { - assert(_.isString(msgIdVal)); - - if(!err) { + Message.getMetaValuesByMessageId(message.replyToMsgId, 'FtnKludge', 'MSGID', (err, msgIdVal) => { + if(!err) { + assert(_.isString(msgIdVal), 'Expected string but got ' + (typeof msgIdVal) + ' (' + msgIdVal + ')'); // got a MSGID - create a REPLY message.meta.FtnKludge.REPLY = msgIdVal; }