diff options
author | cel <cel@lOUVT+Phkvai9a/cCS/RKo+S9hnPAQdVixms/7ldpPA=.ed25519> | 2020-04-11 19:25:06 -0400 |
---|---|---|
committer | cel <cel@lOUVT+Phkvai9a/cCS/RKo+S9hnPAQdVixms/7ldpPA=.ed25519> | 2020-04-11 19:25:06 -0400 |
commit | a49b7966a2055d82321ad7079c8fbc045a41ef37 (patch) | |
tree | 1737a03d3abb368880feb2bfde4f8022883705fc /lib | |
parent | 9ad733614f9de494ff952b9c9f72b834bfb8252b (diff) | |
download | patchfoo-a49b7966a2055d82321ad7079c8fbc045a41ef37.tar.gz patchfoo-a49b7966a2055d82321ad7079c8fbc045a41ef37.zip |
Improve mention listing
Diffstat (limited to 'lib')
-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 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')), |