aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/render-msg.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js
index b4ce016..d36646e 100644
--- a/lib/render-msg.js
+++ b/lib/render-msg.js
@@ -381,6 +381,8 @@ RenderMsg.prototype.title1 = function (cb) {
self.npmPublishTitle(cb)
else if (self.c.type === 'chess_chat')
cb(null, title(self.c.msg))
+ else if (self.c.type === 'chess_invite')
+ self.chessInviteTitle(cb)
else
self.app.getAbout(self.msg.key, function (err, about) {
if (err) return cb(err)
@@ -1135,6 +1137,19 @@ RenderMsg.prototype.chessInvite = function (cb) {
})
}
+RenderMsg.prototype.chessInviteTitle = function (cb) {
+ var self = this
+ var done = multicb({pluck: 1, spread: true})
+ self.getName(self.c.inviting, done())
+ self.getName(self.msg.value.author, done())
+ done(function (err, inviteeLink, inviterLink) {
+ if (err) return cb(err)
+ self.wrap([
+ 'chess: ', inviterLink, ' vs. ', inviteeLink
+ ], cb)
+ })
+}
+
RenderMsg.prototype.chessInviteAccept = function (cb) {
var self = this
self.link(self.c.root, function (err, rootLink) {