···
BLOCKEDBY = "Blocked By",
-
type unfollowRecord = {
let [notices, setNotices] = createSignal<string[]>([], { equals: false });
-
let unfollowRecords: unfollowRecord[] = [];
const fetchFollows = async (agent: any) => {
···
if (unfollowRecords.length == 0 || preview) {
if (preview) unfollowRecords = [];
-
let followRecords = await fetchFollows(agent);
-
let followsDID: string[] = [];
-
for (let n = 0; n < followRecords.length; n++)
-
followsDID[n] = followRecords[n].value.subject;
const PROFILES_LIMIT = 25;
-
for (let n = 0; n < followsDID.length; n = n + PROFILES_LIMIT) {
const res = await agent.getProfiles({
-
actors: followsDID.slice(n, n + PROFILES_LIMIT),
-
let tmpDID: string[] = [];
-
for (let i = 0; i < res.data.profiles.length; i++) {
-
tmpDID[i] = res.data.profiles[i].did;
-
if (form.blockedby && res.data.profiles[i].viewer?.blockedBy) {
-
uri: followRecords[i + n].uri,
-
did: followRecords[i + n].value.subject,
-
status: RepoStatus.BLOCKEDBY,
-
"Found account you are blocked by: " +
-
followRecords[i + n].value.subject +
-
res.data.profiles[i].handle +
-
for (let i = 0; i < PROFILES_LIMIT && n + i < followsDID.length; i++) {
-
(form.deleted || form.deactivated) &&
-
!tmpDID.includes(followsDID[i + n])
-
await agent.getProfile({ actor: followsDID[i + n] });
-
if (form.deleted && e.message.includes("not found")) {
-
uri: followRecords[i + n].uri,
-
did: followRecords[i + n].value.subject,
-
status: RepoStatus.DELETED,
-
"Found deleted account: " + followRecords[i + n].value.subject,
-
} else if (form.deactivated && e.message.includes(" deactivated")) {
-
uri: followRecords[i + n].uri,
-
did: followRecords[i + n].value.subject,
-
status: RepoStatus.DEACTIVATED,
-
"Found deactivated account: " +
-
followRecords[i + n].value.subject,