From 8fd6613c73b3cc03e594c3a4ad89e3303cfd5131 Mon Sep 17 00:00:00 2001 From: cel Date: Fri, 27 Jul 2018 11:01:29 -1000 Subject: Fix rendering non-poll position messages --- lib/render-msg.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib') 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 -- cgit v1.2.3