aboutsummaryrefslogtreecommitdiff
path: root/lib/render-msg.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/render-msg.js')
-rw-r--r--lib/render-msg.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js
index 89a5f90..5fcf9ff 100644
--- a/lib/render-msg.js
+++ b/lib/render-msg.js
@@ -306,6 +306,8 @@ RenderMsg.prototype.message = function (cb) {
case 'share': return this.share(cb)
case 'tag': return this.tag(cb)
case 'edit': return this.edit(cb)
+ case 'dark-crystal/shard': return this.shard(cb)
+ case 'invite': return this.invite(cb)
default: return this.object(cb)
}
}
@@ -1916,3 +1918,31 @@ RenderMsg.prototype.tagTitle = function (cb) {
+ msgName + ' as ' + rootName)
})
}
+
+RenderMsg.prototype.shard = function (cb) {
+ // this.c.errors
+ // this.c.version
+ var self = this
+ self.link(self.c.root, function (err, rootLink) {
+ self.wrap(h('div', [
+ h('div', h('small', h('span.symbol', '  ↳'), ' dark-crystal ', rootLink || '?')),
+ h('p', [
+ h('a', {
+ href: self.toUrl('/shard/' + encodeURIComponent(self.msg.key)),
+ title: 'view shard'
+ }, 'shard')
+ ])
+ ]), cb)
+ })
+}
+
+RenderMsg.prototype.invite = function (cb) {
+ // this.c.version
+ var self = this
+ self.link(self.c.root, function (err, rootLink) {
+ self.wrap(h('div', [
+ h('div', h('small', h('span.symbol', '  ↳'), ' ', rootLink || '?')),
+ self.c.body ? h('div', {innerHTML: self.render.markdown(self.c.body)}) : '',
+ ]), cb)
+ })
+}