Commit 8fd6613c73b3cc03e594c3a4ad89e3303cfd5131
Fix rendering non-poll position messages
cel committed on 7/27/2018, 9:08:30 PMParent: 4f86d04add9a78d06f582d0129f07027154e1d6a
Files changed
lib/render-msg.js | changed |
lib/render-msg.js | |||
---|---|---|---|
@@ -298,9 +298,9 @@ | |||
298 | 298 … | case 'line-comment': return this.lineComment(cb) | |
299 | 299 … | case 'web-init': return this.webInit(cb) | |
300 | 300 … | case 'web-root': return this.webRoot(cb) | |
301 | 301 … | case 'poll': return this.poll(cb) | |
302 | - case 'position': if (this.c.version === 'v1') return this.pollPosition(cb) | ||
302 … | + case 'position': return this.position(cb) | ||
303 | 303 … | case 'scat_message': return this.scat(cb) | |
304 | 304 … | case 'share': return this.share(cb) | |
305 | 305 … | case 'tag': return this.tag(cb) | |
306 | 306 … | case 'edit': return this.edit(cb) | |
@@ -1799,8 +1799,13 @@ | |||
1799 | 1799 … | ) : h('div', 'unknown poll type') | |
1800 | 1800 … | ), cb) | |
1801 | 1801 … | } | |
1802 | 1802 … | ||
1803 … | +RenderMsg.prototype.position = function (cb) { | ||
1804 … | + if (this.c.version === 'v1') return this.pollPosition(cb) | ||
1805 … | + return this.object(cb) | ||
1806 … | +} | ||
1807 … | + | ||
1803 | 1808 … | RenderMsg.prototype.pollPosition = function (cb) { | |
1804 | 1809 … | var self = this | |
1805 | 1810 … | var details = self.c.pollDetails || self.c.details || self.c | |
1806 | 1811 … | var reason = self.c.reason || '' |
Built with git-ssb-web