diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2018-07-27 11:01:29 -1000 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2018-07-27 11:08:30 -1000 |
commit | 8fd6613c73b3cc03e594c3a4ad89e3303cfd5131 (patch) | |
tree | 72fc60acda8096ee5e08d7d09af888021877bdc3 /lib | |
parent | 4f86d04add9a78d06f582d0129f07027154e1d6a (diff) | |
download | patchfoo-8fd6613c73b3cc03e594c3a4ad89e3303cfd5131.tar.gz patchfoo-8fd6613c73b3cc03e594c3a4ad89e3303cfd5131.zip |
Fix rendering non-poll position messages
Diffstat (limited to 'lib')
-rw-r--r-- | lib/render-msg.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js index 2e20d2f..4fff412 100644 --- a/lib/render-msg.js +++ b/lib/render-msg.js @@ -299,7 +299,7 @@ RenderMsg.prototype.message = function (cb) { case 'web-init': return this.webInit(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 'position': return this.position(cb) case 'scat_message': return this.scat(cb) case 'share': return this.share(cb) case 'tag': return this.tag(cb) @@ -1800,6 +1800,11 @@ RenderMsg.prototype.poll = function (cb) { ), cb) } +RenderMsg.prototype.position = function (cb) { + if (this.c.version === 'v1') return this.pollPosition(cb) + return this.object(cb) +} + RenderMsg.prototype.pollPosition = function (cb) { var self = this var details = self.c.pollDetails || self.c.details || self.c |