make a ton of small improvements related to github issues

This commit is contained in:
Quincy Larson
2015-05-23 16:48:55 -07:00
parent a3ab32f339
commit 27a35e65a7
10 changed files with 233 additions and 224 deletions
+5 -4
View File
@@ -588,12 +588,14 @@ module.exports = {
getHelp: function(req, res, next) {
var userName = req.user.profile.username;
var code = req.body.payload.code;
var code = req.body.payload.code ? '\n```\n' +
req.body.payload.code + '\n```\n'
: '';
var challenge = req.body.payload.challenge;
slack.send({
text: "*" + userName + "* wants help with " + challenge + "\n```\n"
+ code + "\n```\n Hey, *" + userName + "*, if no one helps you right " +
text: "*" + userName + "* wants help with " + challenge + " " +
code + "Hey, *" + userName + "*, if no one helps you right " +
"away, try typing out your problem in detail to me. Like this: " +
"http://en.wikipedia.org/wiki/Rubber_duck_debugging",
channel: '#help',
@@ -601,7 +603,6 @@ module.exports = {
icon_emoji: ":hatched_chick:"
});
return res.sendStatus(200);
},
getPair: function(req, res, next) {
+2 -4
View File
@@ -558,12 +558,10 @@ exports.storySubmission = function(req, res, next) {
' replied to your post on Camper News',
text: [
'Just a quick heads-up: ',
data.author.username,
' replied to you on Camper News.',
data.author.username + ' replied to you on Camper News.',
'You can keep this conversation going.',
'Just head back to the discussion here: ',
'http://freecodecamp.com/news/',
data.originalStoryLink,
'http://freecodecamp.com/news/' + data.originalStoryLink,
'- the Free Code Camp Volunteer Team'
].join('\n')
};