File tree Expand file tree Collapse file tree
Sources/ATProtoKit/Utilities Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,6 +31,13 @@ public struct ATProtoTools {
3131
3232 /// Determines whether the reply reference is valid.
3333 ///
34+ /// Both the root and parent records are resolved through Bluesky's AppView
35+ /// (``APIHostname/bskyAppView``) rather than through a specific Personal Data Server (PDS).
36+ /// A reply reference can point to records authored on any PDS, and
37+ /// `com.atproto.repo.getRecord` served by a single PDS only returns records for the
38+ /// repositories that PDS hosts. Resolving through the AppView allows references to records
39+ /// on other PDSes to validate correctly.
40+ ///
3441 /// - Parameters:
3542 /// - reference: The reply reference object to check for validity.
3643 /// - session: The ``UserSession`` instance in relation to the reply. Optional.
@@ -51,7 +58,7 @@ public struct ATProtoTools {
5158 return false
5259 }
5360
54- _ = try await ATProtoKit ( pdsURL: session ? . pdsURL ?? " https://https://public.api.bsky.app " , canUseBlueskyRecords: false ) . getRepositoryRecord (
61+ _ = try await ATProtoKit ( pdsURL: APIHostname . bskyAppView , canUseBlueskyRecords: false ) . getRepositoryRecord (
5562 from: repository,
5663 collection: collection,
5764 recordKey: recordKey
@@ -70,7 +77,7 @@ public struct ATProtoTools {
7077 return false
7178 }
7279
73- _ = try await ATProtoKit ( pdsURL: session ? . pdsURL ?? " https://public.api.bsky.app " , canUseBlueskyRecords: false ) . getRepositoryRecord (
80+ _ = try await ATProtoKit ( pdsURL: APIHostname . bskyAppView , canUseBlueskyRecords: false ) . getRepositoryRecord (
7481 from: repository,
7582 collection: collection,
7683 recordKey: recordKey
You can’t perform that action at this time.
0 commit comments