fix userIsMuted
This commit is contained in:
parent
f1e9c56569
commit
cbd79a48af
1 changed files with 10 additions and 9 deletions
|
|
@ -141,6 +141,7 @@ const Status = {
|
||||||
return this.statusoid ?? useStatusesStore().allStatuses.get(this.statusId)
|
return this.statusoid ?? useStatusesStore().allStatuses.get(this.statusId)
|
||||||
},
|
},
|
||||||
repeatedStatus() {
|
repeatedStatus() {
|
||||||
|
if (this.status.retweeted_status === undefined) return undefined
|
||||||
return useStatusesStore().allStatuses.get(this.status.retweeted_status.id)
|
return useStatusesStore().allStatuses.get(this.status.retweeted_status.id)
|
||||||
},
|
},
|
||||||
repeater() {
|
repeater() {
|
||||||
|
|
@ -198,7 +199,7 @@ const Status = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isRepeat() {
|
isRepeat() {
|
||||||
return !!this.status.retweeted_status
|
return !!this.repeatedStatus
|
||||||
},
|
},
|
||||||
repeaterName() {
|
repeaterName() {
|
||||||
return this.status.user.name || this.status.user.screen_name_ui
|
return this.status.user.name || this.status.user.screen_name_ui
|
||||||
|
|
@ -313,19 +314,19 @@ const Status = {
|
||||||
return !this.unmuted && !this.shouldNotMute && this.muteReasons.length > 0
|
return !this.unmuted && !this.shouldNotMute && this.muteReasons.length > 0
|
||||||
},
|
},
|
||||||
userIsMuted() {
|
userIsMuted() {
|
||||||
if (this.status.user.id === this.currentUser?.id) return false
|
if (!this.currentUser) return false
|
||||||
const { reblog } = this.status
|
if (this.user === this.currentUser) return false
|
||||||
const relationship = useUsersStore().relationship(this.status.user.id)
|
if (this.repeater === this.currentUser) return false
|
||||||
const relationshipReblog =
|
const relationship = useUsersStore().relationship(this.user.id)
|
||||||
reblog && useUsersStore().relationship(reblog.user.id)
|
const relationshipRepeat = useUsersStore().relationship(this.repeater?.id)
|
||||||
return (
|
return (
|
||||||
(status.muted && !status.thread_muted) ||
|
(this.status.muted && !this.status.thread_muted) ||
|
||||||
// Reprööt of a muted post according to BE
|
// Reprööt of a muted post according to BE
|
||||||
(reblog?.muted && !reblog.thread_muted) ||
|
(this.repeatedStatus?.muted && !this.repeatedStatus.thread_muted) ||
|
||||||
// Muted user
|
// Muted user
|
||||||
relationship.muting ||
|
relationship.muting ||
|
||||||
// Muted user of a reprööt
|
// Muted user of a reprööt
|
||||||
relationshipReblog?.muting
|
relationshipRepeat?.muting
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
shouldNotMute() {
|
shouldNotMute() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue