Sharpen fediblock check

This commit is contained in:
MeowcaTheoRange 2024-04-25 13:47:14 -05:00
parent 9cafe2d992
commit d5ca3c0cb9
2 changed files with 3 additions and 3 deletions

View file

@ -84,7 +84,7 @@ export async function GET(request: NextRequest) {
username: tUserExists.acct,
admin: false,
url: tUserExists.url,
banned: JSONt1List.includes(instance), // If user's domain is on tier1, start user banned
banned: JSONt1List.some(fbinst => instance.includes(fbinst)), // If user's domain is on tier1, start user banned
joined: Date.now()
} as UserTable;

View file

@ -34,11 +34,11 @@ export async function GET(request: NextRequest) {
const JSONFnList = fnList.split("\n");
const JSONSsList = ssList.split("\n");
if (JSONSsList.includes(instance)) return new Response('https://seirdy.one/pb/spammy-subdomains.txt', {
if (JSONSsList.some(fbinst => instance.includes(fbinst))) return new Response('https://seirdy.one/pb/spammy-subdomains.txt', {
status: 403
});
if (JSONFnList.includes(instance)) return new Response('https://seirdy.one/pb/FediNuke.txt', {
if (JSONFnList.some(fbinst => instance.includes(fbinst))) return new Response('https://seirdy.one/pb/FediNuke.txt', {
status: 403
});