Added emoji support for Bio

* Fixed issue where bio returns null if there isn't a bio
This commit is contained in:
theflametrooper
2016-09-20 18:24:43 +01:00
parent 549cfc305f
commit ecdc6f7bc2
2 changed files with 7 additions and 1 deletions

View File

@ -74,6 +74,7 @@
"mongodb": "^2.0.33",
"morgan": "^1.6.1",
"mousetrap": "^1.6.0",
"node-emoji": "^1.4.1",
"node-uuid": "^1.4.3",
"nodemailer": "^2.1.0",
"nodemailer-ses-transport": "^1.3.0",
@ -167,4 +168,4 @@
"yargs": "^5.0.0"
},
"snyk": true
}
}

View File

@ -2,6 +2,7 @@ import dedent from 'dedent';
import moment from 'moment-timezone';
import { Observable } from 'rx';
import debugFactory from 'debug';
import emoji from 'node-emoji';
import {
frontEndChallengeId,
@ -331,6 +332,10 @@ module.exports = function(app) {
});
}
if (userPortfolio.bio) {
userPortfolio.bio = emoji.emojify(userPortfolio.bio);
}
return map$.map(({ entities }) => createNameIdMap(entities))
.flatMap(entities => buildDisplayChallenges(
entities,