diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2019-02-13 09:26:44 -1000 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2019-02-13 09:32:05 -1000 |
commit | 3c4896aafaf3b024a1d74c19cc9b0f393a3f8f50 (patch) | |
tree | 6820e923a23ec30cf50d573fca5db8132a543424 /lib | |
parent | be9a1da05281cc6c1c3569d2822ba8ff6e611c7b (diff) | |
download | patchfoo-3c4896aafaf3b024a1d74c19cc9b0f393a3f8f50.tar.gz patchfoo-3c4896aafaf3b024a1d74c19cc9b0f393a3f8f50.zip |
Render label and queue messages
Diffstat (limited to 'lib')
-rw-r--r-- | lib/render-msg.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js index 09c9e13..f998af2 100644 --- a/lib/render-msg.js +++ b/lib/render-msg.js @@ -334,6 +334,8 @@ RenderMsg.prototype.message = function (cb) { case 'scat_message': return this.scat(cb) case 'share': return this.share(cb) case 'tag': return this.tag(cb) + case 'label': return this.label(cb) + case 'queue': return this.queue(cb) case 'edit': return this.edit(cb) case 'dark-crystal/shard': return this.shard(cb) case 'invite': return this.invite(cb) @@ -2093,6 +2095,31 @@ RenderMsg.prototype.tag = function (cb) { } } +RenderMsg.prototype.label = function (cb) { + var done = multicb({pluck: 1, spread: true}) + var self = this + self.link(self.c.link, function (err, link) { + return self.wrapMini([ + 'labeled ', + link, + ' as ', + h('ins', String(self.c.label)) + ], cb) + }) +} + +RenderMsg.prototype.queue = function (cb) { + var done = multicb({pluck: 1, spread: true}) + var self = this + self.link(self.c.message, function (err, link) { + return self.wrapMini([ + self.c.queue || typeof self.c.queue === 'undefined' ? 'queued' : 'unqueued', + ' ', + link + ], cb) + }) +} + RenderMsg.prototype.tagTitle = function (cb) { var self = this if (!self.c.message && !self.c.root) { |