···
import { createSignal, onMount, For, Show, type Component } from "solid-js";
import { createStore } from "solid-js/store";
4
-
import { Agent } from "@atproto/api";
7
+
ComAtprotoRepoApplyWrites,
8
+
ComAtprotoRepoListRecords,
9
+
} from "@atproto/api";
import { BrowserOAuthClient } from "@atproto/oauth-client-browser";
···
const fetchHiddenAccounts = async () => {
const fetchFollows = async () => {
138
-
const fetchPage = async (cursor?: any) => {
143
+
const fetchPage = async (cursor?: string) => {
return await agent.com.atproto.repo.listRecords({
collection: "app.bsky.graph.follow",
···
await fetchFollows().then((follows) => {
setFollowCount(follows.length);
163
-
follows.forEach(async (record: any) => {
168
+
follows.forEach(async (record: ComAtprotoRepoListRecords.Record) => {
let status: RepoStatus | undefined = undefined;
170
+
const follow = record.value as AppBskyGraphFollow.Record;
const res = await agent.getProfile({
169
-
actor: record.value.subject,
175
+
actor: follow.subject,
handle = res.data.handle;
···
status = RepoStatus.BLOCKING;
188
-
handle = await resolveDid(record.value.subject);
194
+
handle = await resolveDid(follow.subject);
e.message.includes("not found") ? RepoStatus.DELETED
···
if (status !== undefined) {
setFollowRecords(followRecords.length, {
210
-
did: record.value.subject,
216
+
did: follow.subject,
···
$type: "com.atproto.repo.applyWrites#delete",
collection: "app.bsky.graph.follow",
rkey: record.uri.split("/").pop(),
238
+
} as ComAtprotoRepoApplyWrites.Delete;