Skip to content

Commit

Permalink
fix: leave interpolation on template
Browse files Browse the repository at this point in the history
  • Loading branch information
nadade committed Feb 25, 2019
1 parent 1730fb8 commit 15b2762
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/reminder.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ const slackApi = require('./slack-api');
const pagerduty = require('./pagerduty');

function formatMessageFromTemplate(templateText, data) {
const current = nconf.get(`slackUsers:${data.oncallEngineers.current.email}`) || data.oncallEngineers.current.name;
const next = nconf.get(`slackUsers:${data.oncallEngineers.next.email}`) || data.oncallEngineers.next.name;
const current = nconf.get(`slackUsers:${data.oncallEngineers.current.email}`);
const next = nconf.get(`slackUsers:${data.oncallEngineers.next.email}`);
const compiled = _.template(templateText);
const outputMessage = compiled({ current, next, data });
debug('Reminder - formatMessage: ', outputMessage);
Expand Down

0 comments on commit 15b2762

Please sign in to comment.