aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/render-msg.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js
index 2f204fc..506ccea 100644
--- a/lib/render-msg.js
+++ b/lib/render-msg.js
@@ -286,6 +286,7 @@ RenderMsg.prototype.message = function (cb) {
case 'talenet-idea-create': return this.ideaCreate(cb)
case 'talenet-idea-association': return this.ideaAssocate(cb)
case 'talenet-skill-create': return this.skillCreate(cb)
+ case 'talenet-skill-similarity': return this.skillSimilarity(cb)
case 'talenet-idea-hat': return this.ideaHat(cb)
case 'talenet-idea-update': return this.ideaUpdate(cb)
case 'talenet-idea-comment':
@@ -1535,6 +1536,21 @@ RenderMsg.prototype.ideaCreate = function (cb) {
), cb)
}
+RenderMsg.prototype.skillSimilarity = function (cb) {
+ var self = this
+ var done = multicb({pluck: 1, spread: true})
+ self.link(self.c.skillKey1, done())
+ self.link(self.c.skillKey2, done())
+ var similarity = !!self.c.similarity
+ done(function (err, skill1, skill2) {
+ self.wrapMini(h('span',
+ 'considers ', skill1, ' to be ',
+ similarity ? 'similar to ' : 'not similar to ',
+ skill2
+ ), cb)
+ })
+}
+
RenderMsg.prototype.identitySkillAssign = function (cb) {
var self = this
self.link(self.c.skillKey, function (err, a) {