diff options
Diffstat (limited to 'lib/render-msg.js')
-rw-r--r-- | lib/render-msg.js | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js index 9b69603..186bb9f 100644 --- a/lib/render-msg.js +++ b/lib/render-msg.js @@ -255,6 +255,7 @@ RenderMsg.prototype.message = function (cb) { case 'mutual/account': return this.mutualAccount(cb) case 'npm-publish': return this.npmPublish(cb) case 'npm-packages': return this.npmPackages(cb) + case 'npm-prebuilds': return this.npmPrebuilds(cb) default: return this.object(cb) } } @@ -540,7 +541,8 @@ RenderMsg.prototype.gitUpdate = function (cb) { var done = multicb({pluck: 1, spread: true}) self.link(self.c.repo, done()) self.render.npmPackageMentions(self.c.mentions, done()) - done(function (err, a, pkgMentionsEl) { + self.render.npmPrebuildMentions(self.c.mentions, done()) + done(function (err, a, pkgMentionsEl, prebuildMentionsEl) { if (err) return cb(err) self.wrap(h('div.ssb-git-update', 'git push ', a, ' ', @@ -583,7 +585,8 @@ RenderMsg.prototype.gitUpdate = function (cb) { '+ ' + self.c.commits_more + ' more commits') : '', self.c.tags_more ? h('div', '+ ' + self.c.tags_more + ' more tags') : '', - pkgMentionsEl + pkgMentionsEl, + prebuildMentionsEl ), cb) }) } @@ -959,6 +962,14 @@ RenderMsg.prototype.npmPackages = function (cb) { }) } +RenderMsg.prototype.npmPrebuilds = function (cb) { + var self = this + self.render.npmPrebuildMentions(self.c.mentions, function (err, el) { + if (err) return cb(err) + self.wrap(el, cb) + }) +} + RenderMsg.prototype.npmPublishTitle = function (cb) { var pkg = this.c.meta || {} var name = pkg.name || pkg._id || '?' |