Files
discord-decomp/modules/activities/utils/fetchIsLinkTrusted.tsx
T
2026-11-01 12:12:55 +02:00

47 lines
1011 B
TypeScript

// Metro module 13540 (f13541).
import { Endpoints } from "../../../Constants";
import { HTTP } from "../../../_bundle/sendRequest";
export async function fetchIsLinkTrusted(c27499_0, url) {
let r59;
let c27499_4 = 0;
let c30637_0;
L12: {
try {
c30637_0 = void 0;
if (c27499_0 === void 0) {
break L12;
}
c27499_4 = 1;
c30637_0 = (await HTTP.get({
url: Endpoints.ACTIVITIES_TRUSTED_LINKS(c27499_0),
rejectWithError: false,
query: {
url
},
timeout: 500
})).body;
r59 = Boolean(c30637_0.trusted);
c27499_4 = 0;
} catch ($e) {
let r26 = $e;
if (c27499_4 !== 0) {
while (true) {
try {
c27499_4 = 0;
} catch ($e) {
r26 = $e;
if (c27499_4 === 0) {
break;
}
continue;
}
return false;
}
}
throw r26;
}
return r59;
}
return false;
}