aboutsummaryrefslogtreecommitdiff
path: root/lib/render.js
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2018-11-18 18:50:13 -1000
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2018-11-18 19:39:55 -1000
commitf4016d4ba6a5039c709e83fb0a4492b96e9d09bd (patch)
treea8511c8f48baa6c65e53842972a8db937cb80273 /lib/render.js
parent6f41c9179b21ade843d0e446342cef6b241c5615 (diff)
downloadpatchfoo-f4016d4ba6a5039c709e83fb0a4492b96e9d09bd.tar.gz
patchfoo-f4016d4ba6a5039c709e83fb0a4492b96e9d09bd.zip
Link to contact messages from contact pages
Diffstat (limited to 'lib/render.js')
-rw-r--r--lib/render.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/render.js b/lib/render.js
index 862cfd9..deaf061 100644
--- a/lib/render.js
+++ b/lib/render.js
@@ -612,10 +612,16 @@ Render.prototype.friendsList = function (prefix) {
prefix = prefix || '/'
var self = this
return pull(
- paramap(function (id, cb) {
- self.app.getAbout(id, function (err, about) {
+ paramap(function (item, cb) {
+ if (typeof item === 'string') item = {feed: item}
+ var id = item.feed
+ self.app.getAbout(item.feed, function (err, about) {
var name = about && about.name || id.substr(0, 8) + '…'
- cb(null, h('a', {href: self.toUrl(prefix + id)}, name))
+ cb(null, [
+ h('a', {href: self.toUrl(prefix + id)}, name),
+ item.msg ? h('a', {href: self.toUrl(item.msg.key)}, '₁') : '',
+ item.msg2 ? h('a', {href: self.toUrl(item.msg2.key)}, '₂') : ''
+ ])
})
}, 8),
function (read) {