aboutsummaryrefslogtreecommitdiff
path: root/lib/render-msg.js
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2018-05-17 21:39:49 -0400
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2018-05-17 21:39:49 -0400
commita60ae1c1ee876443b54162f353da5b59faf81ca4 (patch)
treeee0c1c6cad879b63c9367ab00e3fb98b3d3b017a /lib/render-msg.js
parentde5a116d784cffcbca53b4ed35f3523de6c9bd01 (diff)
downloadpatchfoo-a60ae1c1ee876443b54162f353da5b59faf81ca4.tar.gz
patchfoo-a60ae1c1ee876443b54162f353da5b59faf81ca4.zip
Render scat messages
Diffstat (limited to 'lib/render-msg.js')
-rw-r--r--lib/render-msg.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js
index e7de9e3..e4633e5 100644
--- a/lib/render-msg.js
+++ b/lib/render-msg.js
@@ -297,6 +297,7 @@ RenderMsg.prototype.message = function (cb) {
case 'web-root': return this.webRoot(cb)
case 'poll': return this.poll(cb)
case 'position': if (this.c.version === 'v1') return this.pollPosition(cb)
+ case 'scat_message': return this.scat(cb)
default: return this.object(cb)
}
}
@@ -1788,3 +1789,10 @@ RenderMsg.prototype.pollPosition = function (cb) {
), cb)
})
}
+
+RenderMsg.prototype.scat = function (cb) {
+ this.wrapMini([
+ 'chats ',
+ h('q', String(this.c.text))
+ ], cb)
+}