Hide replies to muted users
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
This commit is contained in:
parent
7c675f1ded
commit
d49884a76f
1 changed files with 19 additions and 1 deletions
|
@ -277,6 +277,22 @@ const Status = {
|
||||||
|
|
||||||
return mentions
|
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 () {
|
muted () {
|
||||||
if (this.statusoid.user.id === this.currentUser.id) return false
|
if (this.statusoid.user.id === this.currentUser.id) return false
|
||||||
const reasonsToMute = this.userIsMuted ||
|
const reasonsToMute = this.userIsMuted ||
|
||||||
|
@ -287,7 +303,9 @@ const Status = {
|
||||||
// bot status
|
// bot status
|
||||||
(this.muteBotStatuses && this.botStatus && !this.compact) ||
|
(this.muteBotStatuses && this.botStatus && !this.compact) ||
|
||||||
// mentions blocked user
|
// mentions blocked user
|
||||||
this.mentionsBlockedUser
|
this.mentionsBlockedUser ||
|
||||||
|
// mentions muted user
|
||||||
|
this.mentionsMutedUser
|
||||||
return !this.unmuted && !this.shouldNotMute && reasonsToMute
|
return !this.unmuted && !this.shouldNotMute && reasonsToMute
|
||||||
},
|
},
|
||||||
userIsMuted () {
|
userIsMuted () {
|
||||||
|
|
Loading…
Reference in a new issue