From 63f0ef02ef5ebe4295b7019a8cd521dae5aae0cb Mon Sep 17 00:00:00 2001 From: cel Date: Thu, 4 May 2017 09:17:04 -1000 Subject: Show names of About message targets unless the about message is itself assigning a name --- lib/render-msg.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib') 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), ' '] : '', -- cgit v1.2.3