rename and comment

This commit is contained in:
Namekuji 2023-04-30 07:58:03 -04:00
parent ba734a9f3c
commit 151b30c53d
No known key found for this signature in database
GPG Key ID: B541BD6E646CABC7
2 changed files with 2 additions and 2 deletions

View File

@ -32,6 +32,6 @@ export async function shouldSilenceInstance(
): Promise<boolean> { ): Promise<boolean> {
const { silencedHosts } = meta ?? (await fetchMeta()); const { silencedHosts } = meta ?? (await fetchMeta());
return silencedHosts.some( return silencedHosts.some(
(limitedHost) => host === limitedHost || host.endsWith(`.${limitedHost}`), (silencedHost) => host === silencedHost || host.endsWith(`.${silencedHost}`),
); );
} }

View File

@ -207,7 +207,7 @@ new Promise<Note>(async (res, rej) => {
const inSilencedInstance = Users.isRemoteUser(user) && await shouldSilenceInstance(user.host); const inSilencedInstance = Users.isRemoteUser(user) && await shouldSilenceInstance(user.host);
// If the // Enforce home visibility if the user is in a silenced instance.
if (data.visibility === "public" && inSilencedInstance) { if (data.visibility === "public" && inSilencedInstance) {
data.visibility = "home"; data.visibility = "home";
} }