···
1
-
import { PersistentCache } from "@/lib/cache";
import { expect } from "@/lib/result";
···
18
-
ComAtprotoRepoApplyWrites,
19
-
ComAtprotoRepoCreateRecord,
20
-
} from "@atcute/atproto";
21
-
import { createResultSchema } from "@atcute/atproto/types/repo/applyWrites";
15
+
import { AppBskyFeedPost } from "@atcute/bluesky";
import { feedViewPostSchema } from "@atcute/bluesky/types/app/feed/defs";
29
-
} from "@atcute/lexicons";
17
+
import { is, parseResourceUri, ResourceUri } from "@atcute/lexicons";
import { AtprotoDid, parseCanonicalResourceUri } from "@atcute/lexicons/syntax";
export default defineBackground({
···
175
-
} else if (uri === item.post.uri) {
164
+
uri === item.post.uri &&
165
+
item.reply?.parent.$type === "app.bsky.feed.defs#postView"
replyTo: item.reply?.parent.uri,
172
+
uri === item.reply?.parent.uri &&
173
+
item.reply?.parent.$type === "app.bsky.feed.defs#postView"
176
+
replyTo: (item.reply.parent.record as AppBskyFeedPost.Main)
177
+
.reply?.parent.uri,
const parsedUri = await cacheFronter(uri, fronter);
···
promises.push(handleUri(item.post.uri, "post"));
if (item.reply?.parent) {
promises.push(handleUri(item.reply.parent.uri, "post"));
194
+
if (item.reply?.parent.$type === "app.bsky.feed.defs#postView") {
195
+
const grandparentUri = (
196
+
item.reply.parent.record as AppBskyFeedPost.Main
197
+
).reply?.parent.uri;
198
+
if (grandparentUri)
199
+
promises.push(handleUri(grandparentUri, "post"));
promises.push(handleUri(item.reply.root.uri, "post"));