aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/render-msg.js17
-rw-r--r--lib/render.js8
2 files changed, 24 insertions, 1 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js
index 991204d..cd82713 100644
--- a/lib/render-msg.js
+++ b/lib/render-msg.js
@@ -1363,7 +1363,22 @@ RenderMsg.prototype.mutualAccount = function (cb) {
}
RenderMsg.prototype.gathering = function (cb) {
- this.wrapMini('gathering', cb)
+ var self = this
+ var id = self.msg.key
+ var idEl = id ? h('code', h('small', id)) : 'gathering'
+ if (self.c.mentions) {
+ self.render.prepareLinks(self.c.mentions, function (err, mentions) {
+ if (err) return cb(err)
+ self.wrap(mentions.map(function (link, i) {
+ return [
+ ' ',
+ h('a', {href: self.toUrl(link.link)}, linkName(link))
+ ]
+ }), cb)
+ })
+ return
+ }
+ self.wrapMini(idEl, cb)
}
RenderMsg.prototype.micro = function (cb) {
diff --git a/lib/render.js b/lib/render.js
index 36f23ba..a39ba73 100644
--- a/lib/render.js
+++ b/lib/render.js
@@ -480,6 +480,14 @@ Render.prototype.getName = function (id, cb) {
Render.prototype.getNameLink = function (id, opts, cb) {
if (!cb && typeof opts === 'function') cb = opts, opts = null
+ if (typeof id === 'object' && id !== null && typeof id.link === 'string') {
+ var link = id
+ id = link.link
+ if (typeof link.name === 'string') {
+ return cb(null, h('a', {href: self.toUrl(id)},
+ u.truncate(link.name, length)))
+ }
+ }
var length = opts && opts.length || Infinity
var self = this
self.getName(id, function (err, name) {