diff options
Diffstat (limited to 'lib/render-msg.js')
-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) { |