From b0cddb46f0d273976872352c328d5c849408334a Mon Sep 17 00:00:00 2001 From: cel Date: Thu, 22 Jun 2017 14:48:47 -1000 Subject: Render chess invite accept --- lib/render-msg.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/render-msg.js') diff --git a/lib/render-msg.js b/lib/render-msg.js index cd5a84f..65f1ca0 100644 --- a/lib/render-msg.js +++ b/lib/render-msg.js @@ -243,6 +243,7 @@ RenderMsg.prototype.message = function (cb) { case 'mutual/account': return this.mutualAccount(cb) case 'npm-publish': return this.npmPublish(cb) case 'ssb_chess_invite': return this.chessInvite(cb) + case 'ssb_chess_invite_accept': return this.chessInviteAccept(cb) case 'ssb_chess_move': return this.chessMove(cb) default: return this.object(cb) } @@ -1064,3 +1065,14 @@ RenderMsg.prototype.chessInvite = function (cb) { ], cb) }) } + +RenderMsg.prototype.chessInviteAccept = function (cb) { + var self = this + self.link(self.c.root, function (err, rootLink) { + if (err) return cb(err) + self.wrap([ + h('div', h('small', '> ', rootLink)), + h('p', 'accepts invitation to play chess') + ], cb) + }) +} -- cgit v1.2.3