mirror of
https://akkoma.dev/AkkomaGang/akkoma-fe.git
synced 2024-11-08 17:39:09 +00:00
Mark replies to muted users for muting (#90)
Reviewed-on: https://akkoma.dev/AkkomaGang/pleroma-fe/pulls/90 Co-authored-by: eris <femmediscord@gmail.com> Co-committed-by: eris <femmediscord@gmail.com>
This commit is contained in:
parent
45d8747fdd
commit
5f09326879
1 changed files with 20 additions and 2 deletions
|
@ -277,6 +277,22 @@ const Status = {
|
|||
|
||||
return mentions
|
||||
},
|
||||
mentionsMutedUser () {
|
||||
// XXX: doesn't work on domain blocks, because users from blocked domains
|
||||
// don't appear in `attentions' and therefore cannot be filtered.
|
||||
let mentions = false
|
||||
|
||||
// find if user in mentions list is blocked
|
||||
this.status.attentions.forEach((attn) => {
|
||||
if (attn.id === this.currentUser.id) return
|
||||
const relationship = this.$store.getters.relationship(attn.id)
|
||||
if (relationship.muting) {
|
||||
mentions = true
|
||||
}
|
||||
})
|
||||
|
||||
return mentions
|
||||
},
|
||||
muted () {
|
||||
if (this.statusoid.user.id === this.currentUser.id) return false
|
||||
const reasonsToMute = this.userIsMuted ||
|
||||
|
@ -287,7 +303,9 @@ const Status = {
|
|||
// bot status
|
||||
(this.muteBotStatuses && this.botStatus && !this.compact) ||
|
||||
// mentions blocked user
|
||||
this.mentionsBlockedUser
|
||||
this.mentionsBlockedUser ||
|
||||
// mentions muted user
|
||||
this.mentionsMutedUser
|
||||
return !this.unmuted && !this.shouldNotMute && reasonsToMute
|
||||
},
|
||||
userIsMuted () {
|
||||
|
@ -340,7 +358,7 @@ const Status = {
|
|||
return (!this.shouldNotMute) && (
|
||||
(this.muted && this.hideFilteredStatuses) ||
|
||||
(this.userIsMuted && this.hideMutedUsers) ||
|
||||
(this.status.thread_muted && this.hideMutedThreads) ||
|
||||
((this.status.thread_muted || this.mentionsMutedUser) && this.hideMutedThreads) ||
|
||||
(this.muteWordHits.length > 0 && this.hideWordFilteredPosts) ||
|
||||
(this.mentionsBlockedUser && this.hideThreadsWithBlockedUsers)
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue