Skip to content

Commit

Permalink
Merge pull request #71 from thesis/use-adapter-patch-plus-minor-log-u…
Browse files Browse the repository at this point in the history
…pdates

Use adapter patch plus minor log updates
  • Loading branch information
kb0rg authored Jul 1, 2019
2 parents f192312 + e56fb81 commit 31bf266
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
19 changes: 12 additions & 7 deletions scripts/suggest.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)

Expand All @@ -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!`,
Expand Down
2 changes: 1 addition & 1 deletion scripts/zoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 31bf266

Please sign in to comment.