aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-10-22 13:05:57 -1000
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-10-22 13:05:57 -1000
commita6fb417c7741c1d0a64baf2d4824ccf973e338bb (patch)
treed859e6e67e8f7bb14c0e8a82c3477bde85e6ddc7 /lib
parent069af0cdf671deed1e378cb735985ac302a5c568 (diff)
downloadpatchfoo-a6fb417c7741c1d0a64baf2d4824ccf973e338bb.tar.gz
patchfoo-a6fb417c7741c1d0a64baf2d4824ccf973e338bb.zip
Clarify chess invite thread titles
Diffstat (limited to 'lib')
-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) {