diff --git a/apps/ssb.json b/apps/ssb.json index 72fd8ab8..8709e81b 100644 --- a/apps/ssb.json +++ b/apps/ssb.json @@ -1,5 +1,5 @@ { "type": "tildefriends-app", "emoji": "🦀", - "previous": "&QdW1N8dMttww41AFP9qNRor9P9Rsiamnl/YQSJiviQE=.sha256" + "previous": "&g0o5rMFQcyi3GwyWGrSQcQPPABae0yrUpVehztef3XE=.sha256" } diff --git a/apps/ssb/tf-message.js b/apps/ssb/tf-message.js index 704439f8..7a3afa72 100644 --- a/apps/ssb/tf-message.js +++ b/apps/ssb/tf-message.js @@ -999,15 +999,13 @@ class TfMessageElement extends LitElement { `); } else if (content.type === 'blog') { let self = this; - tfrpc.rpc.get_blob(content.blog).then(function (data) { - self.blog_data = data; + self.blog_data = tfrpc.rpc.get_blob(content.blog).then(function (data) { + return data + ? unsafeHTML(tfutils.markdown(data)) + : html`Blog post content unavailable.`; }); let payload = this.expanded[(this.message.id || '') + ':blog'] - ? html`
- ${this.blog_data - ? unsafeHTML(tfutils.markdown(this.blog_data)) - : 'Loading...'} -
` + ? until(this.blog_data, 'Loading...') : undefined; let body; switch (this.format) { @@ -1020,7 +1018,7 @@ class TfMessageElement extends LitElement { case 'message': body = html`
self.toggle_expanded(':blog')} > @@ -1031,8 +1029,13 @@ class TfMessageElement extends LitElement { : undefined} ${content.summary}
+

+ ${this.expanded[(this.message.id || '') + ':blog'] + ? 'Show less' + : 'Show more'} +

- ${payload} +
${payload}
`; break; }