rename and comment
This commit is contained in:
parent
ba734a9f3c
commit
151b30c53d
|
@ -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}`),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue