aboutsummaryrefslogtreecommitdiff
path: root/lib/render-msg.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/render-msg.js')
-rw-r--r--lib/render-msg.js16
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js
index 2bc382e..f351039 100644
--- a/lib/render-msg.js
+++ b/lib/render-msg.js
@@ -1322,7 +1322,7 @@ RenderMsg.prototype.chessInvite = function (cb) {
var myColor = self.c.myColor
self.link(self.c.inviting, function (err, link) {
if (err) return cb(err)
- self.wrap([
+ self.wrapMini([
'invites ', link, ' to play chess',
// myColor ? h('p', 'my color is ' + myColor) : ''
], cb)
@@ -1344,12 +1344,16 @@ RenderMsg.prototype.chessInviteTitle = function (cb) {
RenderMsg.prototype.chessInviteAccept = function (cb) {
var self = this
- self.link(self.c.root, function (err, rootLink) {
+ self.getMsg(self.c.root, function (err, rootMsg) {
if (err) return cb(err)
- self.wrap([
- h('div', h('small', '> ', rootLink)),
- h('p', 'accepts invitation to play chess')
- ], cb)
+ self.link(rootMsg.value.author, function (err, rootAuthorLink) {
+ if (err) return cb(err)
+ self.wrapMini([
+ 'accepts ',
+ h('a', {href: self.toUrl(rootMsg.key)}, 'invitation to play chess'), ' ',
+ 'with ', rootAuthorLink
+ ], cb)
+ })
})
}