From 66a1c44a08391be6697a378db3c0b953d2fb766d Mon Sep 17 00:00:00 2001 From: cel Date: Fri, 10 Mar 2017 10:22:35 -0500 Subject: Publish votes more like other messages --- lib/render-msg.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/render-msg.js') diff --git a/lib/render-msg.js b/lib/render-msg.js index c99b206..fb4b211 100644 --- a/lib/render-msg.js +++ b/lib/render-msg.js @@ -108,7 +108,7 @@ RenderMsg.prototype.wrap = function (content, cb) { {href: this.toUrl(this.msg.key)}, this.msg.key)), channel ? [' ', h('a', {href: this.toUrl(channel)}, channel)] : '')), h('td.msg-right', this.msg.key ? - h('form', {method: 'post', action: '/vote'}, + h('form', {method: 'post', action: ''}, this.msg.rel ? [this.msg.rel, ' '] : '', h('a', {href: this.toUrl(this.msg.key) + '?raw'}, 'raw'), ' ', this.voteFormInner('dig') @@ -142,7 +142,7 @@ RenderMsg.prototype.wrapMini = function (content, cb) { this.issues(done()), content), h('td.msg-right', this.msg.key ? - h('form', {method: 'post', action: '/vote'}, + h('form', {method: 'post', action: ''}, this.msg.rel ? [this.msg.rel, ' '] : '', h('a', {href: this.toUrl(this.msg.key) + '?raw'}, 'raw'), ' ', this.voteFormInner('dig') @@ -170,6 +170,7 @@ RenderMsg.prototype.recpsIds = function () { RenderMsg.prototype.voteFormInner = function (expression) { return [ + h('input', {type: 'hidden', name: 'action', value: 'vote'}), h('input', {type: 'hidden', name: 'recps', value: this.recpsIds().join(',')}), h('input', {type: 'hidden', name: 'link', value: this.msg.key}), -- cgit v1.2.3