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 c5d4756..b4ce016 100644
--- a/lib/render-msg.js
+++ b/lib/render-msg.js
@@ -253,6 +253,8 @@ RenderMsg.prototype.message = function (cb) {
case 'chess_game_end':
case 'ssb_chess_game_end':
return this.chessGameEnd(cb)
+ case 'chess_chat':
+ return this.chessChat(cb)
case 'wifi-network': return this.wifiNetwork(cb)
case 'mutual/credit': return this.mutualCredit(cb)
case 'mutual/account': return this.mutualAccount(cb)
@@ -377,6 +379,8 @@ RenderMsg.prototype.title1 = function (cb) {
cb(null, self.c.record && JSON.stringify(self.c.record.data) || self.msg.key)
else if (self.c.type === 'npm-publish')
self.npmPublishTitle(cb)
+ else if (self.c.type === 'chess_chat')
+ cb(null, title(self.c.msg))
else
self.app.getAbout(self.msg.key, function (err, about) {
if (err) return cb(err)
@@ -1175,6 +1179,17 @@ RenderMsg.prototype.chessGameEnd = function (cb) {
})
}
+RenderMsg.prototype.chessChat = 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', self.c.msg)
+ ], cb)
+ })
+}
+
RenderMsg.prototype.chessMove = function (cb) {
if (this.opts.full) return this.chessMoveFull(cb)
return this.chessMoveMini(cb)