From 98e6afa1afc2307db4a17c0f00608138b487712c Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Wed, 23 Mar 2016 20:59:38 -0600 Subject: [PATCH] * Don't blow up @ message network record() if no network configured for areaTag * Remove console.log() of message persist; use proper client.log --- core/scanner_tossers/ftn_bso.js | 2 +- mods/msg_area_post_fse.js | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/core/scanner_tossers/ftn_bso.js b/core/scanner_tossers/ftn_bso.js index 6414ee35..2cb0d3c7 100644 --- a/core/scanner_tossers/ftn_bso.js +++ b/core/scanner_tossers/ftn_bso.js @@ -357,7 +357,7 @@ function FTNMessageScanTossModule() { // check paths, Addresses, etc. this.isAreaConfigValid = function(areaConfig) { - if(!_.isString(areaConfig.tag) || !_.isString(areaConfig.network)) { + if(!areaConfig || !_.isString(areaConfig.tag) || !_.isString(areaConfig.network)) { return false; } diff --git a/mods/msg_area_post_fse.js b/mods/msg_area_post_fse.js index 16292cea..292c0eec 100644 --- a/mods/msg_area_post_fse.js +++ b/mods/msg_area_post_fse.js @@ -25,7 +25,7 @@ function AreaPostFSEModule(options) { // we're posting, so always start with 'edit' mode this.editorMode = 'edit'; - this.menuMethods.editModeMenuSave = function(formData, extraArgs) { + this.menuMethods.editModeMenuSave = function() { var msg; async.series( @@ -49,9 +49,13 @@ function AreaPostFSEModule(options) { if(err) { // :TODO:... sooooo now what? } else { - console.log(msg); // :TODO: remove me -- probably log that one was saved, however. + // note: not logging 'from' here as it's part of client.log.xxxx() + self.client.log.info( + { to : msg.toUserName, subject : msg.subject, uuid : msg.uuid }, + 'Message persisted' + ); } - + self.nextMenu(); } );