aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/render-msg.js8
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), ' '] : '',