ssb: Don't display mentions for tags that are used in the text of a message.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 22m22s

This commit is contained in:
Cory McWilliams 2025-01-04 21:05:24 -05:00
parent aa86ee1066
commit 2f36db9142
2 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
{ {
"type": "tildefriends-app", "type": "tildefriends-app",
"emoji": "🦀", "emoji": "🦀",
"previous": "&51G4JroQ8+3iBddnFQoTVXYrLTtZ/egQ+0NU4z60zBc=.sha256" "previous": "&MT6BBjSYx78iHX7+KHJzCnHYGPOJB4Vng8Dw2ymDaS4=.sha256"
} }

View File

@ -253,7 +253,7 @@ class TfMessageElement extends LitElement {
render_mentions() { render_mentions() {
let mentions = this.message?.content?.mentions || []; let mentions = this.message?.content?.mentions || [];
mentions = mentions.filter( mentions = mentions.filter(
(x) => this.message?.content?.text?.indexOf(x.link) === -1 (x) => this.message?.content?.text?.indexOf(typeof(x) === 'string' ? x : x.link) === -1
); );
if (mentions.length) { if (mentions.length) {
let self = this; let self = this;