refactor(mutelist): no need to check admin specific list for isBlocked

This commit is contained in:
enes 2025-01-16 13:06:16 +01:00
parent 8c10a467be
commit a835996db7
2 changed files with 1 additions and 14 deletions

View File

@ -161,13 +161,6 @@ export const blogRouteLoader =
} }
if ( if (
isAdmin &&
muteLists.value.admin.replaceableEvents.includes(result.blog.aTag)
) {
result.isBlocked = true
}
if (
!isAdmin &&
muteLists.value.user.replaceableEvents.includes(result.blog.aTag) muteLists.value.user.replaceableEvents.includes(result.blog.aTag)
) { ) {
result.isBlocked = true result.isBlocked = true

View File

@ -166,14 +166,8 @@ export const modRouteLoader =
result.postWarning = 'admin' result.postWarning = 'admin'
} }
// Check if user has blocked this profile
if ( if (
isAdmin &&
muteLists.value.admin.replaceableEvents.includes(result.mod.aTag)
) {
result.isBlocked = true
}
if (
!isAdmin &&
muteLists.value.user.replaceableEvents.includes(result.mod.aTag) muteLists.value.user.replaceableEvents.includes(result.mod.aTag)
) { ) {
result.isBlocked = true result.isBlocked = true