aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/render-msg.js16
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js
index eadbcd1..786294f 100644
--- a/lib/render-msg.js
+++ b/lib/render-msg.js
@@ -308,7 +308,8 @@ RenderMsg.prototype.title = function (cb) {
else
self.app.getAbout(self.msg.key, function (err, about) {
if (err) return cb(err)
- if (about.name) return cb(null, about.name)
+ var name = about.name || about.title || about.description
+ if (name) return cb(null, name)
self.message(false, function (err, el) {
if (err) return cb(err)
cb(null, '%' + title(h('div', el).textContent))
@@ -348,19 +349,28 @@ RenderMsg.prototype.link1 = function (link, cb) {
RenderMsg.prototype.about = function (cb) {
var img = u.linkDest(this.c.image)
+ var done = multicb({pluck: 1, spread: true})
+ var elCb = done()
this.wrapMini([
this.c.about === this.msg.value.author ? 'self-identifies' :
['identifies ', h('a', {href: this.toUrl(this.c.about)}, truncate(this.c.about, 10))],
' as ',
this.c.name ? [h('ins', this.c.name), ' '] : '',
this.c.description ? h('div',
- {innerHTML: this.render.markdown(this.c.description)}) : h('br'),
+ {innerHTML: this.render.markdown(this.c.description)}) : '',
+ this.c.title ? h('h3', this.c.title) : '',
+ this.c.attendee ? h('div',
+ this.link1(this.c.attendee.id, done()),
+ this.c.attendee.remove ? ' is not attending' : ' is attending'
+ ) : '',
+ this.c.location ? h('div', 'at ', this.c.location) : '',
img ? h('a', {href: this.toUrl(img)},
h('img.ssb-avatar-image', {
src: this.render.imageUrl(img),
alt: ' ',
})) : ''
- ], cb)
+ ], elCb)
+ done(cb)
}
RenderMsg.prototype.contact = function (cb) {