aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcel <cel@lOUVT+Phkvai9a/cCS/RKo+S9hnPAQdVixms/7ldpPA=.ed25519>2020-04-11 19:25:06 -0400
committercel <cel@lOUVT+Phkvai9a/cCS/RKo+S9hnPAQdVixms/7ldpPA=.ed25519>2020-04-11 19:25:06 -0400
commita49b7966a2055d82321ad7079c8fbc045a41ef37 (patch)
tree1737a03d3abb368880feb2bfde4f8022883705fc
parent9ad733614f9de494ff952b9c9f72b834bfb8252b (diff)
downloadpatchfoo-a49b7966a2055d82321ad7079c8fbc045a41ef37.tar.gz
patchfoo-a49b7966a2055d82321ad7079c8fbc045a41ef37.zip
Improve mention listing
-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 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')),