diff --git a/src/scripts/pagerduty.coffee b/src/scripts/pagerduty.coffee index e8228ef9..7cb57ed5 100644 --- a/src/scripts/pagerduty.coffee +++ b/src/scripts/pagerduty.coffee @@ -629,10 +629,10 @@ module.exports = (robot) -> cb null if scheduleName? - withScheduleMatching msg, scheduleName, (s) -> - renderSchedule s, (err) -> + SchedulesMatching msg, scheduleName, (s) -> + async.map s, renderSchedule, (err) -> if err? - robot.emit 'error' + robot.emit 'error', err, msg return msg.send messages.join("\n") else