aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/render-msg.js21
1 files changed, 20 insertions, 1 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js
index f28e9de..d7820b4 100644
--- a/lib/render-msg.js
+++ b/lib/render-msg.js
@@ -210,6 +210,7 @@ RenderMsg.prototype.message = function (cb) {
case 'issue-edit': return this.issueEdit(cb)
case 'music-release-cc': return this.musicRelease(cb)
case 'ssb-dns': return this.dns(cb)
+ case 'gathering': return this.gathering(cb)
case 'ferment/audio':
case 'robeson/audio':
return this.audio(cb)
@@ -358,6 +359,13 @@ RenderMsg.prototype.link1 = function (link, cb) {
return a
}
+function dateTime(d) {
+ var date = new Date(d.epoch)
+ return date.toUTCString()
+ // d.bias
+ // d.epoch
+}
+
RenderMsg.prototype.about = function (cb) {
var img = u.linkDest(this.c.image)
var done = multicb({pluck: 1, spread: true})
@@ -371,7 +379,10 @@ RenderMsg.prototype.about = function (cb) {
isSelf
? hasDescription ? 'self-describes' : 'self-identifies'
: [hasDescription ? 'describes' : 'identifies', ' ',
- h('a', {href: this.toUrl(this.c.about)}, truncate(this.c.about, 10))],
+ this.c.about
+ ? 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',
@@ -381,6 +392,10 @@ RenderMsg.prototype.about = function (cb) {
this.link1(this.c.attendee.link, done()),
this.c.attendee.remove ? ' is not attending' : ' is attending'
) : '',
+ this.c.startDateTime ? h('div',
+ 'starting at ', dateTime(this.c.startDateTime)) : '',
+ this.c.endDateTime ? h('div',
+ 'ending at ', dateTime(this.c.endDateTime)) : '',
this.c.location ? h('div', 'at ', this.c.location) : '',
img ? h('a', {href: this.toUrl(img)},
h('img.ssb-avatar-image', {
@@ -757,3 +772,7 @@ RenderMsg.prototype.mutualCredit = function (cb) {
RenderMsg.prototype.mutualAccount = function (cb) {
return this.object(cb)
}
+
+RenderMsg.prototype.gathering = function (cb) {
+ this.wrapMini('gathering', cb)
+}