From f4016d4ba6a5039c709e83fb0a4492b96e9d09bd Mon Sep 17 00:00:00 2001 From: cel Date: Sun, 18 Nov 2018 18:50:13 -1000 Subject: Link to contact messages from contact pages --- lib/render.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'lib/render.js') 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) { -- cgit v1.2.3