From a9feab3b1f5335b14fc0feba4da2b9fe40aa1224 Mon Sep 17 00:00:00 2001 From: cel Date: Wed, 20 Sep 2017 07:50:23 -1000 Subject: Render npm package publishers --- lib/render-msg.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'lib/render-msg.js') diff --git a/lib/render-msg.js b/lib/render-msg.js index 2e58610..1cb0936 100644 --- a/lib/render-msg.js +++ b/lib/render-msg.js @@ -536,7 +536,11 @@ RenderMsg.prototype.gitUpdate = function (cb) { var size = [].concat(self.c.packs, self.c.indexes) .map(function (o) { return o && o.size }) .reduce(function (total, s) { return total + s }) - self.link(self.c.repo, function (err, a) { + + 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) { if (err) return cb(err) self.wrap(h('div.ssb-git-update', 'git push ', a, ' ', @@ -579,7 +583,7 @@ RenderMsg.prototype.gitUpdate = function (cb) { '+ ' + self.c.commits_more + ' more commits') : '', self.c.tags_more ? h('div', '+ ' + self.c.tags_more + ' more tags') : '', - self.render.npmPackageMentions(self.c.mentions) + pkgMentionsEl ), cb) }) } @@ -949,9 +953,10 @@ RenderMsg.prototype.npmPublish = function (cb) { RenderMsg.prototype.npmPackages = function (cb) { var self = this - self.wrap([ - self.render.npmPackageMentions(self.c.mentions) - ], cb) + self.render.npmPackageMentions(self.c.mentions, function (err, el) { + if (err) return cb(err) + self.wrap(el, cb) + }) } RenderMsg.prototype.npmPublishTitle = function (cb) { -- cgit v1.2.3