fixed mentions line again
This commit is contained in:
parent
97e86381c8
commit
4465de5241
1 changed files with 8 additions and 15 deletions
|
@ -166,23 +166,16 @@ const Status = {
|
||||||
muteWordHits () {
|
muteWordHits () {
|
||||||
return muteWordHits(this.status, this.muteWords)
|
return muteWordHits(this.status, this.muteWords)
|
||||||
},
|
},
|
||||||
mentions () {
|
|
||||||
return this.status.attentions.filter(attn => {
|
|
||||||
return attn.screen_name !== this.replyToName &&
|
|
||||||
attn.screen_name !== this.status.user.screen_name
|
|
||||||
}).map(attn => ({
|
|
||||||
url: attn.statusnet_profile_url,
|
|
||||||
content: attn.screen_name,
|
|
||||||
userId: attn.id
|
|
||||||
}))
|
|
||||||
},
|
|
||||||
mentionsLine () {
|
mentionsLine () {
|
||||||
const writtenMentions = this.headTailLinks ? this.headTailLinks.writtenMentions : []
|
if (!this.headTailLinks) return []
|
||||||
const set = new Set(writtenMentions.map(_ => _.url))
|
const writtenSet = new Set(this.headTailLinks.writtenMentions.map(_ => _.url))
|
||||||
return this.status.attentions.filter(attn => {
|
return this.status.attentions.filter(attn => {
|
||||||
return attn.screen_name !== this.replyToName &&
|
// no reply user
|
||||||
attn.screen_name !== this.status.user.screen_name &&
|
return attn.id !== this.status.in_reply_to_user_id &&
|
||||||
!set.has(attn.url)
|
// no self-replies
|
||||||
|
attn.statusnet_profile_url !== this.status.user.statusnet_profile_url &&
|
||||||
|
// don't include if mentions is written
|
||||||
|
!writtenSet.has(attn.statusnet_profile_url)
|
||||||
}).map(attn => ({
|
}).map(attn => ({
|
||||||
url: attn.statusnet_profile_url,
|
url: attn.statusnet_profile_url,
|
||||||
content: attn.screen_name,
|
content: attn.screen_name,
|
||||||
|
|
Loading…
Reference in a new issue