logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git
commit: 2182af405864cffcc7ddca8d373cc14f38770c9e
parent 2cfff1b8b9c642e9284483d6658312d9a3763417
Author: Henry Jameson <me@hjkos.com>
Date:   Thu, 12 Aug 2021 03:08:57 +0300

made the code responsible for showing unwritten mentions actually work

Diffstat:

Msrc/components/status/status.js19+++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/src/components/status/status.js b/src/components/status/status.js @@ -176,15 +176,18 @@ const Status = { userId: attn.id })) }, - alsoMentions () { - if (!this.headTailLinks) return [] - const set = new Set(this.headTailLinks.writtenMentions.map(m => m.url)) - return this.headTailLinks.writtenMentions.filter(mention => { - return !set.has(mention.url) - }) - }, mentionsLine () { - return this.alsoMentions + const writtenMentions = this.headTailLinks ? this.headTailLinks.writtenMentions : [] + const set = new Set(writtenMentions.map(_ => _.url)) + return this.status.attentions.filter(attn => { + return attn.screen_name !== this.replyToName && + attn.screen_name !== this.status.user.screen_name && + !set.has(attn.url) + }).map(attn => ({ + url: attn.statusnet_profile_url, + content: attn.screen_name, + userId: attn.id + })) }, hasMentionsLine () { return this.mentionsLine.length > 0