diff --git a/apps/ssb/tf-message.js b/apps/ssb/tf-message.js index 40a48ec9..f8a50aa6 100644 --- a/apps/ssb/tf-message.js +++ b/apps/ssb/tf-message.js @@ -168,10 +168,7 @@ class TfMessageElement extends LitElement { render_mentions() { let mentions = this.message?.content?.mentions || []; - mentions = mentions.filter(x => - x.name?.startsWith('audio:') || - x.name?.startsWith('video:') || - this.message?.content?.text?.indexOf(x.link) === -1); + mentions = mentions.filter(x => this.message?.content?.text?.indexOf(x.link) === -1); if (mentions.length) { let self = this; return html` diff --git a/apps/ssb/tf-utils.js b/apps/ssb/tf-utils.js index de09a431..aa209a29 100644 --- a/apps/ssb/tf-utils.js +++ b/apps/ssb/tf-utils.js @@ -13,6 +13,16 @@ function image(node, entering) { this.disableTags -= 1; this.lit(''); } + } else if (node.firstChild?.type === 'text' && + node.firstChild.literal.startsWith('audio:')) { + if (entering) { + this.lit(''); + } } else { if (entering) { if (this.disableTags === 0) {