diff --git a/package-lock.json b/package-lock.json index 281c2f46..fab773a5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -742,8 +742,8 @@ "integrity": "sha512-LKrWEFfIsDhHX334eRiEWNRNVlluFKxgOM5JmK+AaMa7OFb5fnelMwZeFrFojssPDUsJhQ1nDMQgHsP95cAWTg==" }, "hubot-reload-flowdock": { - "version": "github:thesis/hubot-flowdock#60f334c64f8efb38835adb7864bc2fefa83ba12c", - "from": "github:thesis/hubot-flowdock#60f334c64f8efb38835adb7864bc2fefa83ba12c", + "version": "github:thesis/hubot-flowdock#5623fb773df67254777a7c860db04ddc6d315956", + "from": "github:thesis/hubot-flowdock#5623fb773df67254777a7c860db04ddc6d315956", "requires": { "@reloaddk/flowdock": "^0.10.2", "parent-require": "^1.0.0" diff --git a/package.json b/package.json index e1706885..327be09c 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "hubot-gif-locker": "^1.0.7", "hubot-help": "^1.0.1", "hubot-redis-brain": "^1.0.0", - "hubot-reload-flowdock": "github:thesis/hubot-flowdock#60f334c64f8efb38835adb7864bc2fefa83ba12c", + "hubot-reload-flowdock": "github:thesis/hubot-flowdock#5623fb773df67254777a7c860db04ddc6d315956", "hubot-reload": "0.0.2", "hubot-rules": "^0.1.2", "hubot-scripts": "^2.17.2", diff --git a/scripts/suggest.js b/scripts/suggest.js index 1df70723..9d357b45 100644 --- a/scripts/suggest.js +++ b/scripts/suggest.js @@ -9,9 +9,9 @@ // DEFAULT_TARGET_FLOW - flow name to use if robot name not found in TARGET_FLOW_PER_ROBOT // // Commands: -// hubot suggest - Posts a message to the specifed flow with the content of -// the suggestion and the name of the user who suggested it, replies to the -// command with a link to that post +// hubot suggest - Posts a message to the main hubot flow, with content of the suggestion & name of the user, and replies to the command with a link to that flow + +const util = require("util") const { getRoomIdFromName, @@ -69,6 +69,13 @@ module.exports = function(robot) { user: "", room: targetFlowId, } + + // debug logging to try to see why next message is not sending + robot.logger.info(`SUGGEST command should now ping flow: ${targetFlowId}`) + robot.logger.info( + `SUGGEST command expected message: ${formattedSuggestion}`, + ) + // TODO: get link to this post robot.send(envelope, formattedSuggestion) @@ -81,11 +88,9 @@ module.exports = function(robot) { res.send( `Thanks for the suggestion! We'll be discussing it further in [${targetFlowName}](${targetFlowLink}), feel free to join us there.`, ) - } catch (error) { - console.log(`WTF?????\n${error}`) + } catch (err) { robot.logger.error( - `Failed to send user suggestion to target flow: `, - error, + `Failed to send user suggestion to target flow: ${util.inspect(err)}`, ) return res.send( `Something went wrong trying to post your suggestion in [${targetFlowName}](${targetFlowLink}) - please pop over there and let us know!`, diff --git a/scripts/zoom.js b/scripts/zoom.js index 905b0878..a2063902 100644 --- a/scripts/zoom.js +++ b/scripts/zoom.js @@ -7,7 +7,7 @@ // ZOOM_API_KEY - API key for Zoom API, used to sign requests https://developer.zoom.us/me/ // // Commands: -// hubot zoom - Responds with an available meeting from the registered accounts +// hubot zoom - Responds with an available meeting from the registered accounts, follows up with a prompt to post meeting notes const zoom = require("../lib/zoom"), util = require("util")