From a49b7966a2055d82321ad7079c8fbc045a41ef37 Mon Sep 17 00:00:00 2001 From: cel Date: Sat, 11 Apr 2020 19:25:06 -0400 Subject: Improve mention listing --- 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 cd82713..678a377 100644 --- a/lib/render-msg.js +++ b/lib/render-msg.js @@ -1124,9 +1124,11 @@ RenderMsg.prototype.valueTable = function (val, depth, cb) { ? h('ul', val.map(function (item) { return h('li', self.valueTable(item, depth + 1, done())) })) - : typeof val.link === 'string' && u.isRef(val.link) - ? self.linkValue(val, done()) - : h('table.ssb-object', Object.keys(val).map(function (key) { + : typeof val.link === 'string' ? ( + val.link[0] === '#' + ? h('a', {href: self.toUrl('/channel/' + val.link.substr(1))}, val.link) + : self.linkValue(val.link, done()) + ) : h('table.ssb-object', Object.keys(val).map(function (key) { if (key === 'text') { return h('tr', h('td', h('strong', 'text')), -- cgit v1.2.3