diff --git a/apps/ssb.json b/apps/ssb.json index 85c72fa4..5c4dddc2 100644 --- a/apps/ssb.json +++ b/apps/ssb.json @@ -1,5 +1,5 @@ { "type": "tildefriends-app", "emoji": "🐌", - "previous": "&rMCwJnENRN/cYxMPF06+r0dlKVyFFuL3fziFjG14oN4=.sha256" + "previous": "&eHrt88ylDUCaDFIj3DTdUaHPYQRe81K//O80CHp+pyk=.sha256" } \ No newline at end of file diff --git a/apps/ssb/tf-message.js b/apps/ssb/tf-message.js index ac1fcf69..1f780d42 100644 --- a/apps/ssb/tf-message.js +++ b/apps/ssb/tf-message.js @@ -258,9 +258,16 @@ class TfMessageElement extends LitElement { case 'md': raw_button = html` self.format = 'message'}>`; break; - default: + case 'decrypted': raw_button = html` self.format = 'raw'}>`; break; + default: + if (this.message.decrypted) { + raw_button = html` self.format = 'decrypted'}>`; + } else { + raw_button = html` self.format = 'raw'}>`; + } + break; } function small_frame(inner) { let body; @@ -526,7 +533,11 @@ class TfMessageElement extends LitElement { `); } else if (typeof(this.message.content) == 'string') { if (this.message?.decrypted) { - return small_frame(html`🔓
${JSON.stringify(this.decrypted, null, 2)}
`); + if (this.format == 'decrypted') { + return small_frame(html`🔓
${JSON.stringify(this.message.decrypted, null, 2)}
`); + } else { + return small_frame(html`🔓
${this.message.decrypted.type}
`); + } } else { return small_frame(html`🔒`); }