1
0
mirror of https://git.boykissers.com/pawkey/pawkey-sk.git synced 2025-12-20 04:04:16 +00:00

add: isSilenced handling to user and timeline

This commit is contained in:
Mar0xy
2023-10-18 13:34:16 +02:00
parent 95b2689a21
commit a4a1b8bb8b
19 changed files with 171 additions and 11 deletions

View File

@@ -87,10 +87,12 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
}
const [
followings,
userIdsWhoMeMuting,
userIdsWhoMeMutingRenotes,
userIdsWhoBlockingMe,
] = await Promise.all([
this.cacheService.userFollowingsCache.fetch(me.id),
this.cacheService.userMutingsCache.fetch(me.id),
this.cacheService.renoteMutingsCache.fetch(me.id),
this.cacheService.userBlockedCache.fetch(me.id),
@@ -151,6 +153,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
if (ps.withRenotes === false) return false;
}
}
if (note.user?.isSilenced && note.userId !== me.id && !followings[note.userId]) return false;
return true;
});