diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-05-04 09:17:04 -1000 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-05-04 09:17:04 -1000 |
commit | 63f0ef02ef5ebe4295b7019a8cd521dae5aae0cb (patch) | |
tree | dc610f0bd84ecb245fe7575719abaa6be8d03d91 | |
parent | 69c833a059339473969a2e3d35c5f42e4a93bbfd (diff) | |
download | patchfoo-63f0ef02ef5ebe4295b7019a8cd521dae5aae0cb.tar.gz patchfoo-63f0ef02ef5ebe4295b7019a8cd521dae5aae0cb.zip |
Show names of About message targets
unless the about message is itself assigning a name
-rw-r--r-- | lib/render-msg.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js index c1c388c..03db33d 100644 --- a/lib/render-msg.js +++ b/lib/render-msg.js @@ -375,14 +375,16 @@ RenderMsg.prototype.about = function (cb) { var hasDescription = this.c.description != null var wrap = hasDescription ? this.wrap : this.wrapMini var isSelf = this.c.about === this.msg.value.author + // if this about message gives the thing a name, show its id + var showComputedName = !isSelf && !this.c.name wrap.call(this, [ isSelf ? hasDescription ? 'self-describes' : 'self-identifies' : [hasDescription ? 'describes' : 'identifies', ' ', - this.c.about - ? h('a', {href: this.toUrl(this.c.about)}, truncate(this.c.about, 10)) - : '?' + !this.c.about ? '?' + : showComputedName ? this.link1(this.c.about, done()) + : h('a', {href: this.toUrl(this.c.about)}, truncate(this.c.about, 10)) ], ' as ', this.c.name ? [h('ins', this.c.name), ' '] : '', |