Merge branch 'master' into mobile-news
Conflicts: controllers/story.js seed_data/field-guides.json views/coursewares/showVideo.jade
This commit is contained in:
@ -517,35 +517,33 @@ exports.storySubmission = function(req, res, next) {
|
|||||||
if (err) {
|
if (err) {
|
||||||
return next(err);
|
return next(err);
|
||||||
}
|
}
|
||||||
if (recipient && recipient.email) {
|
// If the emails of both authors differ, only then proceed with email notification
|
||||||
// If the emails of both authors differ, only then proceed with email notification
|
if (typeof data.author !== 'undefined' && data.author.email && typeof recipient !== 'undefined' && recipient.email && (data.author.email !== recipient.email)) {
|
||||||
if (data.author.email && (data.author.email !== recipient.email)) {
|
var transporter = nodemailer.createTransport({
|
||||||
var transporter = nodemailer.createTransport({
|
service: 'Mandrill',
|
||||||
service: 'Mandrill',
|
auth: {
|
||||||
auth: {
|
user: secrets.mandrill.user,
|
||||||
user: secrets.mandrill.user,
|
pass: secrets.mandrill.password
|
||||||
pass: secrets.mandrill.password
|
}
|
||||||
}
|
});
|
||||||
});
|
|
||||||
|
|
||||||
var mailOptions = {
|
var mailOptions = {
|
||||||
to: recipient.email,
|
to: recipient.email,
|
||||||
from: 'Team@freecodecamp.com',
|
from: 'Team@freecodecamp.com',
|
||||||
subject: data.author.username + ' replied to your post on Camper News',
|
subject: data.author.username + ' replied to your post on Camper News',
|
||||||
text: [
|
text: [
|
||||||
'Just a quick heads-up: ' + data.author.username + ' replied to you on Camper News.',
|
'Just a quick heads-up: ' + data.author.username + ' replied to you on Camper News.',
|
||||||
'You can keep this conversation going.',
|
'You can keep this conversation going.',
|
||||||
'Just head back to the discussion here: http://freecodecamp.com/news/' + data.originalStoryLink,
|
'Just head back to the discussion here: http://freecodecamp.com/stories/' + data.originalStoryLink,
|
||||||
'- the Free Code Camp Volunteer Team'
|
'- the Free Code Camp Volunteer Team'
|
||||||
].join('\n')
|
].join('\n')
|
||||||
};
|
};
|
||||||
|
|
||||||
transporter.sendMail(mailOptions, function (err) {
|
transporter.sendMail(mailOptions, function (err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -68,7 +68,7 @@ block content
|
|||||||
|
|
||||||
- if (user.progressTimestamps.length > 2)
|
- if (user.progressTimestamps.length > 2)
|
||||||
.button-spacer
|
.button-spacer
|
||||||
a.animated.fadeIn.btn.btn-lg.btn-block.btn-twitter(href="https://twitter.com/intent/tweet?text=I%20just%20#{verb}%20%40FreeCodeCamp%20Bonfire:%20#{name}&url=http%3A%2F%2Ffreecodecamp.com/bonfires/#{dashedName}&hashtags=LearnToCode, JavaScript" target="_blank")
|
a.animated.fadeIn.btn.btn-lg.btn-block.btn-twitter(href="https://twitter.com/intent/tweet?text=I%20just%20#{verb}%20%40FreeCodeCamp%20Challenge:%20#{name}&url=http%3A%2F%2Ffreecodecamp.com/challenges/#{dashedName}&hashtags=LearnToCode, JavaScript" target="_blank")
|
||||||
i.fa.fa-twitter  
|
i.fa.fa-twitter  
|
||||||
= phrase
|
= phrase
|
||||||
- else
|
- else
|
||||||
|
@ -52,4 +52,4 @@ block content
|
|||||||
.landing-skill-icon.ion-settings
|
.landing-skill-icon.ion-settings
|
||||||
h2.black-text ...and other tools
|
h2.black-text ...and other tools
|
||||||
.big-break
|
.big-break
|
||||||
a.btn.btn-cta.signup-btn.btn-block(href="/pmi-acp-agile-project-manager-form") I want to lead agile projects for nonprofits
|
a.btn.btn-cta.signup-btn.btn-block(href="/pmi-acp-agile-project-managers-form") I want to lead agile projects for nonprofits
|
||||||
|
Reference in New Issue
Block a user