@atproto/bsky 0.0.75 → 0.0.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/api/app/bsky/actor/getProfiles.d.ts.map +1 -1
- package/dist/api/app/bsky/actor/getProfiles.js +9 -1
- package/dist/api/app/bsky/actor/getProfiles.js.map +1 -1
- package/dist/api/app/bsky/actor/searchActorsTypeahead.js +10 -2
- package/dist/api/app/bsky/actor/searchActorsTypeahead.js.map +1 -1
- package/dist/api/app/bsky/feed/getActorLikes.js +2 -2
- package/dist/api/app/bsky/feed/getActorLikes.js.map +1 -1
- package/dist/api/app/bsky/feed/getFeed.d.ts.map +1 -1
- package/dist/api/app/bsky/feed/getFeed.js +8 -1
- package/dist/api/app/bsky/feed/getFeed.js.map +1 -1
- package/dist/api/app/bsky/feed/getLikes.js +6 -6
- package/dist/api/app/bsky/feed/getLikes.js.map +1 -1
- package/dist/api/app/bsky/feed/getPosts.d.ts.map +1 -1
- package/dist/api/app/bsky/feed/getPosts.js +12 -5
- package/dist/api/app/bsky/feed/getPosts.js.map +1 -1
- package/dist/api/app/bsky/feed/getQuotes.d.ts +4 -0
- package/dist/api/app/bsky/feed/getQuotes.d.ts.map +1 -0
- package/dist/api/app/bsky/feed/getQuotes.js +67 -0
- package/dist/api/app/bsky/feed/getQuotes.js.map +1 -0
- package/dist/api/app/bsky/feed/getRepostedBy.js +6 -6
- package/dist/api/app/bsky/feed/getRepostedBy.js.map +1 -1
- package/dist/api/app/bsky/feed/searchPosts.js +4 -4
- package/dist/api/app/bsky/feed/searchPosts.js.map +1 -1
- package/dist/api/app/bsky/graph/getFollowers.js +8 -8
- package/dist/api/app/bsky/graph/getFollowers.js.map +1 -1
- package/dist/api/app/bsky/graph/getList.d.ts.map +1 -1
- package/dist/api/app/bsky/graph/getList.js +32 -2
- package/dist/api/app/bsky/graph/getList.js.map +1 -1
- package/dist/api/app/bsky/notification/listNotifications.d.ts.map +1 -1
- package/dist/api/app/bsky/notification/listNotifications.js +29 -8
- package/dist/api/app/bsky/notification/listNotifications.js.map +1 -1
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +2 -0
- package/dist/api/index.js.map +1 -1
- package/dist/auth-verifier.d.ts +8 -3
- package/dist/auth-verifier.d.ts.map +1 -1
- package/dist/auth-verifier.js +43 -29
- package/dist/auth-verifier.js.map +1 -1
- package/dist/data-plane/server/db/database-schema.d.ts +4 -2
- package/dist/data-plane/server/db/database-schema.d.ts.map +1 -1
- package/dist/data-plane/server/db/migrations/20240723T220700077Z-quotes-post-aggs.d.ts +4 -0
- package/dist/data-plane/server/db/migrations/20240723T220700077Z-quotes-post-aggs.d.ts.map +1 -0
- package/dist/data-plane/server/db/migrations/20240723T220700077Z-quotes-post-aggs.js +15 -0
- package/dist/data-plane/server/db/migrations/20240723T220700077Z-quotes-post-aggs.js.map +1 -0
- package/dist/data-plane/server/db/migrations/20240723T220703655Z-quotes.d.ts +4 -0
- package/dist/data-plane/server/db/migrations/20240723T220703655Z-quotes.d.ts.map +1 -0
- package/dist/data-plane/server/db/migrations/20240723T220703655Z-quotes.js +30 -0
- package/dist/data-plane/server/db/migrations/20240723T220703655Z-quotes.js.map +1 -0
- package/dist/data-plane/server/db/migrations/20240801T193939827Z-post-gate.d.ts +4 -0
- package/dist/data-plane/server/db/migrations/20240801T193939827Z-post-gate.d.ts.map +1 -0
- package/dist/data-plane/server/db/migrations/20240801T193939827Z-post-gate.js +20 -0
- package/dist/data-plane/server/db/migrations/20240801T193939827Z-post-gate.js.map +1 -0
- package/dist/data-plane/server/db/migrations/20240808T224251220Z-post-gate-flags.d.ts +4 -0
- package/dist/data-plane/server/db/migrations/20240808T224251220Z-post-gate-flags.d.ts.map +1 -0
- package/dist/data-plane/server/db/migrations/20240808T224251220Z-post-gate-flags.js +28 -0
- package/dist/data-plane/server/db/migrations/20240808T224251220Z-post-gate-flags.js.map +1 -0
- package/dist/data-plane/server/db/migrations/index.d.ts +4 -0
- package/dist/data-plane/server/db/migrations/index.d.ts.map +1 -1
- package/dist/data-plane/server/db/migrations/index.js +5 -1
- package/dist/data-plane/server/db/migrations/index.js.map +1 -1
- package/dist/data-plane/server/db/tables/post-agg.d.ts +1 -0
- package/dist/data-plane/server/db/tables/post-agg.d.ts.map +1 -1
- package/dist/data-plane/server/db/tables/post-gate.d.ts +14 -0
- package/dist/data-plane/server/db/tables/post-gate.d.ts.map +1 -0
- package/dist/data-plane/server/db/tables/post-gate.js +4 -0
- package/dist/data-plane/server/db/tables/post-gate.js.map +1 -0
- package/dist/data-plane/server/db/tables/post.d.ts +3 -0
- package/dist/data-plane/server/db/tables/post.d.ts.map +1 -1
- package/dist/data-plane/server/db/tables/quote.d.ts +16 -0
- package/dist/data-plane/server/db/tables/quote.d.ts.map +1 -0
- package/dist/data-plane/server/db/tables/quote.js +4 -0
- package/dist/data-plane/server/db/tables/quote.js.map +1 -0
- package/dist/data-plane/server/indexing/index.d.ts +2 -0
- package/dist/data-plane/server/indexing/index.d.ts.map +1 -1
- package/dist/data-plane/server/indexing/index.js +6 -0
- package/dist/data-plane/server/indexing/index.js.map +1 -1
- package/dist/data-plane/server/indexing/plugins/post-gate.d.ts +10 -0
- package/dist/data-plane/server/indexing/plugins/post-gate.d.ts.map +1 -0
- package/dist/data-plane/server/indexing/plugins/post-gate.js +101 -0
- package/dist/data-plane/server/indexing/plugins/post-gate.js.map +1 -0
- package/dist/data-plane/server/indexing/plugins/post.d.ts +2 -0
- package/dist/data-plane/server/indexing/plugins/post.d.ts.map +1 -1
- package/dist/data-plane/server/indexing/plugins/post.js +122 -15
- package/dist/data-plane/server/indexing/plugins/post.js.map +1 -1
- package/dist/data-plane/server/indexing/plugins/thread-gate.d.ts.map +1 -1
- package/dist/data-plane/server/indexing/plugins/thread-gate.js +12 -0
- package/dist/data-plane/server/indexing/plugins/thread-gate.js.map +1 -1
- package/dist/data-plane/server/routes/index.d.ts.map +1 -1
- package/dist/data-plane/server/routes/index.js +2 -0
- package/dist/data-plane/server/routes/index.js.map +1 -1
- package/dist/data-plane/server/routes/interactions.d.ts.map +1 -1
- package/dist/data-plane/server/routes/interactions.js +2 -1
- package/dist/data-plane/server/routes/interactions.js.map +1 -1
- package/dist/data-plane/server/routes/quotes.d.ts +6 -0
- package/dist/data-plane/server/routes/quotes.d.ts.map +1 -0
- package/dist/data-plane/server/routes/quotes.js +27 -0
- package/dist/data-plane/server/routes/quotes.js.map +1 -0
- package/dist/data-plane/server/routes/records.d.ts.map +1 -1
- package/dist/data-plane/server/routes/records.js +11 -1
- package/dist/data-plane/server/routes/records.js.map +1 -1
- package/dist/data-plane/server/util.d.ts +6 -7
- package/dist/data-plane/server/util.d.ts.map +1 -1
- package/dist/data-plane/server/util.js +1 -9
- package/dist/data-plane/server/util.js.map +1 -1
- package/dist/hydration/feed.d.ts +10 -0
- package/dist/hydration/feed.d.ts.map +1 -1
- package/dist/hydration/feed.js +31 -7
- package/dist/hydration/feed.js.map +1 -1
- package/dist/hydration/hydrator.d.ts +5 -2
- package/dist/hydration/hydrator.d.ts.map +1 -1
- package/dist/hydration/hydrator.js +102 -38
- package/dist/hydration/hydrator.js.map +1 -1
- package/dist/hydration/util.d.ts +0 -1
- package/dist/hydration/util.d.ts.map +1 -1
- package/dist/hydration/util.js +1 -5
- package/dist/hydration/util.js.map +1 -1
- package/dist/lexicon/index.d.ts +2 -0
- package/dist/lexicon/index.d.ts.map +1 -1
- package/dist/lexicon/index.js +4 -0
- package/dist/lexicon/index.js.map +1 -1
- package/dist/lexicon/lexicons.d.ts +141 -0
- package/dist/lexicon/lexicons.d.ts.map +1 -1
- package/dist/lexicon/lexicons.js +142 -0
- package/dist/lexicon/lexicons.js.map +1 -1
- package/dist/lexicon/types/app/bsky/embed/record.d.ts +8 -1
- package/dist/lexicon/types/app/bsky/embed/record.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/embed/record.js +11 -1
- package/dist/lexicon/types/app/bsky/embed/record.js.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/defs.d.ts +2 -0
- package/dist/lexicon/types/app/bsky/feed/defs.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/defs.js.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/getQuotes.d.ts +44 -0
- package/dist/lexicon/types/app/bsky/feed/getQuotes.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/feed/getQuotes.js +3 -0
- package/dist/lexicon/types/app/bsky/feed/getQuotes.js.map +1 -0
- package/dist/lexicon/types/app/bsky/feed/postgate.d.ts +25 -0
- package/dist/lexicon/types/app/bsky/feed/postgate.d.ts.map +1 -0
- package/dist/lexicon/types/app/bsky/feed/postgate.js +27 -0
- package/dist/lexicon/types/app/bsky/feed/postgate.js.map +1 -0
- package/dist/lexicon/types/app/bsky/feed/threadgate.d.ts +2 -0
- package/dist/lexicon/types/app/bsky/feed/threadgate.d.ts.map +1 -1
- package/dist/lexicon/types/app/bsky/feed/threadgate.js.map +1 -1
- package/dist/proto/bsky_connect.d.ts +21 -1
- package/dist/proto/bsky_connect.d.ts.map +1 -1
- package/dist/proto/bsky_connect.js +20 -0
- package/dist/proto/bsky_connect.js.map +1 -1
- package/dist/proto/bsky_pb.d.ts +96 -0
- package/dist/proto/bsky_pb.d.ts.map +1 -1
- package/dist/proto/bsky_pb.js +306 -4
- package/dist/proto/bsky_pb.js.map +1 -1
- package/dist/util/uris.d.ts +12 -0
- package/dist/util/uris.d.ts.map +1 -0
- package/dist/util/uris.js +34 -0
- package/dist/util/uris.js.map +1 -0
- package/dist/views/index.d.ts +8 -2
- package/dist/views/index.d.ts.map +1 -1
- package/dist/views/index.js +83 -39
- package/dist/views/index.js.map +1 -1
- package/dist/views/types.d.ts +1 -1
- package/dist/views/types.d.ts.map +1 -1
- package/dist/views/types.js.map +1 -1
- package/dist/views/util.d.ts +11 -1
- package/dist/views/util.d.ts.map +1 -1
- package/dist/views/util.js +19 -8
- package/dist/views/util.js.map +1 -1
- package/package.json +6 -6
- package/proto/bsky.proto +33 -0
- package/src/api/app/bsky/actor/getProfiles.ts +10 -1
- package/src/api/app/bsky/actor/searchActorsTypeahead.ts +9 -4
- package/src/api/app/bsky/feed/getActorLikes.ts +1 -1
- package/src/api/app/bsky/feed/getFeed.ts +12 -1
- package/src/api/app/bsky/feed/getLikes.ts +1 -1
- package/src/api/app/bsky/feed/getPosts.ts +10 -2
- package/src/api/app/bsky/feed/getQuotes.ts +105 -0
- package/src/api/app/bsky/feed/getRepostedBy.ts +1 -1
- package/src/api/app/bsky/feed/searchPosts.ts +1 -1
- package/src/api/app/bsky/graph/getFollowers.ts +1 -1
- package/src/api/app/bsky/graph/getList.ts +47 -4
- package/src/api/app/bsky/notification/listNotifications.ts +32 -6
- package/src/api/index.ts +2 -0
- package/src/auth-verifier.ts +78 -51
- package/src/data-plane/server/db/database-schema.ts +7 -3
- package/src/data-plane/server/db/migrations/20240723T220700077Z-quotes-post-aggs.ts +12 -0
- package/src/data-plane/server/db/migrations/20240723T220703655Z-quotes.ts +28 -0
- package/src/data-plane/server/db/migrations/20240801T193939827Z-post-gate.ts +17 -0
- package/src/data-plane/server/db/migrations/20240808T224251220Z-post-gate-flags.ts +25 -0
- package/src/data-plane/server/db/migrations/index.ts +4 -0
- package/src/data-plane/server/db/tables/post-agg.ts +1 -0
- package/src/data-plane/server/db/tables/post-gate.ts +12 -0
- package/src/data-plane/server/db/tables/post.ts +3 -0
- package/src/data-plane/server/db/tables/quote.ts +15 -0
- package/src/data-plane/server/indexing/index.ts +7 -0
- package/src/data-plane/server/indexing/plugins/post-gate.ts +104 -0
- package/src/data-plane/server/indexing/plugins/post.ts +151 -16
- package/src/data-plane/server/indexing/plugins/thread-gate.ts +12 -0
- package/src/data-plane/server/routes/index.ts +2 -0
- package/src/data-plane/server/routes/interactions.ts +2 -1
- package/src/data-plane/server/routes/quotes.ts +32 -0
- package/src/data-plane/server/routes/records.ts +11 -1
- package/src/data-plane/server/util.ts +0 -8
- package/src/hydration/feed.ts +58 -12
- package/src/hydration/hydrator.ts +112 -24
- package/src/hydration/util.ts +0 -4
- package/src/lexicon/index.ts +12 -0
- package/src/lexicon/lexicons.ts +145 -0
- package/src/lexicon/types/app/bsky/embed/record.ts +19 -0
- package/src/lexicon/types/app/bsky/feed/defs.ts +2 -0
- package/src/lexicon/types/app/bsky/feed/getQuotes.ts +54 -0
- package/src/lexicon/types/app/bsky/feed/postgate.ts +47 -0
- package/src/lexicon/types/app/bsky/feed/threadgate.ts +2 -0
- package/src/proto/bsky_connect.ts +24 -0
- package/src/proto/bsky_pb.ts +289 -0
- package/src/util/uris.ts +31 -0
- package/src/views/index.ts +90 -35
- package/src/views/types.ts +1 -0
- package/src/views/util.ts +37 -7
- package/tests/__snapshots__/feed-generation.test.ts.snap +37 -0
- package/tests/admin/admin-auth.test.ts +15 -8
- package/tests/auth.test.ts +2 -1
- package/tests/data-plane/__snapshots__/indexing.test.ts.snap +18 -0
- package/tests/data-plane/handle-invalidation.test.ts +31 -5
- package/tests/data-plane/indexing.test.ts +139 -23
- package/tests/data-plane/thread-mutes.test.ts +41 -9
- package/tests/feed-generation.test.ts +150 -32
- package/tests/postgates.test.ts +186 -0
- package/tests/seed/feed-hidden-replies.ts +62 -0
- package/tests/seed/postgates.ts +56 -0
- package/tests/server.test.ts +1 -1
- package/tests/views/__snapshots__/author-feed.test.ts.snap +56 -0
- package/tests/views/__snapshots__/block-lists.test.ts.snap +6 -0
- package/tests/views/__snapshots__/blocks.test.ts.snap +10 -0
- package/tests/views/__snapshots__/list-feed.test.ts.snap +22 -0
- package/tests/views/__snapshots__/lists.test.ts.snap +145 -26
- package/tests/views/__snapshots__/mute-lists.test.ts.snap +8 -0
- package/tests/views/__snapshots__/mutes.test.ts.snap +6 -0
- package/tests/views/__snapshots__/posts.test.ts.snap +12 -0
- package/tests/views/__snapshots__/quotes.test.ts.snap +399 -0
- package/tests/views/__snapshots__/starter-packs.test.ts.snap +245 -4
- package/tests/views/__snapshots__/thread.test.ts.snap +50 -0
- package/tests/views/__snapshots__/timeline.test.ts.snap +170 -0
- package/tests/views/account-deactivation.test.ts +8 -2
- package/tests/views/actor-likes.test.ts +27 -6
- package/tests/views/actor-search.test.ts +5 -1
- package/tests/views/author-feed.test.ts +76 -21
- package/tests/views/block-lists.test.ts +201 -40
- package/tests/views/blocks.test.ts +245 -46
- package/tests/views/feed-hidden-replies.test.ts +246 -0
- package/tests/views/feed-view-post.test.ts +501 -0
- package/tests/views/follows.test.ts +133 -22
- package/tests/views/known-followers.test.ts +43 -7
- package/tests/views/labeler-service.test.ts +36 -6
- package/tests/views/likes.test.ts +8 -5
- package/tests/views/list-feed.test.ts +25 -4
- package/tests/views/lists.test.ts +73 -31
- package/tests/views/mute-lists.test.ts +101 -29
- package/tests/views/mutes.test.ts +77 -17
- package/tests/views/notifications.test.ts +141 -25
- package/tests/views/posts.test.ts +13 -2
- package/tests/views/profile.test.ts +37 -11
- package/tests/views/quotes.test.ts +105 -0
- package/tests/views/reposts.test.ts +31 -5
- package/tests/views/starter-packs.test.ts +83 -3
- package/tests/views/suggested-follows.test.ts +31 -5
- package/tests/views/suggestions.test.ts +37 -6
- package/tests/views/thread.test.ts +121 -20
- package/tests/views/threadgating.test.ts +128 -22
- package/tests/views/timeline.test.ts +67 -14
|
@@ -3,6 +3,7 @@ import { AtpAgent } from '@atproto/api'
|
|
|
3
3
|
import { Secp256k1Keypair } from '@atproto/crypto'
|
|
4
4
|
import { createServiceAuthHeaders } from '@atproto/xrpc-server'
|
|
5
5
|
import { RepoRef } from '../../src/lexicon/types/com/atproto/admin/defs'
|
|
6
|
+
import { ids } from '../../src/lexicon/lexicons'
|
|
6
7
|
|
|
7
8
|
describe('admin auth', () => {
|
|
8
9
|
let network: TestNetwork
|
|
@@ -68,10 +69,10 @@ describe('admin auth', () => {
|
|
|
68
69
|
})
|
|
69
70
|
|
|
70
71
|
it('allows service auth requests from the configured appview did', async () => {
|
|
71
|
-
const
|
|
72
|
+
const updateHeaders = await createServiceAuthHeaders({
|
|
72
73
|
iss: modServiceDid,
|
|
73
74
|
aud: bskyDid,
|
|
74
|
-
lxm:
|
|
75
|
+
lxm: ids.ComAtprotoAdminUpdateSubjectStatus,
|
|
75
76
|
keypair: modServiceKey,
|
|
76
77
|
})
|
|
77
78
|
await agent.api.com.atproto.admin.updateSubjectStatus(
|
|
@@ -80,14 +81,20 @@ describe('admin auth', () => {
|
|
|
80
81
|
takedown: { applied: true, ref: 'test-repo' },
|
|
81
82
|
},
|
|
82
83
|
{
|
|
83
|
-
...
|
|
84
|
+
...updateHeaders,
|
|
84
85
|
encoding: 'application/json',
|
|
85
86
|
},
|
|
86
87
|
)
|
|
87
88
|
|
|
89
|
+
const getHeaders = await createServiceAuthHeaders({
|
|
90
|
+
iss: modServiceDid,
|
|
91
|
+
aud: bskyDid,
|
|
92
|
+
lxm: ids.ComAtprotoAdminGetSubjectStatus,
|
|
93
|
+
keypair: modServiceKey,
|
|
94
|
+
})
|
|
88
95
|
const res = await agent.api.com.atproto.admin.getSubjectStatus(
|
|
89
96
|
{ did: repoSubject.did },
|
|
90
|
-
|
|
97
|
+
getHeaders,
|
|
91
98
|
)
|
|
92
99
|
expect(res.data.subject.did).toBe(repoSubject.did)
|
|
93
100
|
expect(res.data.takedown?.applied).toBe(true)
|
|
@@ -97,7 +104,7 @@ describe('admin auth', () => {
|
|
|
97
104
|
const headers = await createServiceAuthHeaders({
|
|
98
105
|
iss: altModDid,
|
|
99
106
|
aud: bskyDid,
|
|
100
|
-
lxm:
|
|
107
|
+
lxm: ids.ComAtprotoAdminUpdateSubjectStatus,
|
|
101
108
|
keypair: modServiceKey,
|
|
102
109
|
})
|
|
103
110
|
const attempt = agent.api.com.atproto.admin.updateSubjectStatus(
|
|
@@ -118,7 +125,7 @@ describe('admin auth', () => {
|
|
|
118
125
|
const headers = await createServiceAuthHeaders({
|
|
119
126
|
iss: sc.dids.alice,
|
|
120
127
|
aud: bskyDid,
|
|
121
|
-
lxm:
|
|
128
|
+
lxm: ids.ComAtprotoAdminUpdateSubjectStatus,
|
|
122
129
|
keypair: aliceKey,
|
|
123
130
|
})
|
|
124
131
|
const attempt = agent.api.com.atproto.admin.updateSubjectStatus(
|
|
@@ -139,7 +146,7 @@ describe('admin auth', () => {
|
|
|
139
146
|
const headers = await createServiceAuthHeaders({
|
|
140
147
|
iss: modServiceDid,
|
|
141
148
|
aud: bskyDid,
|
|
142
|
-
lxm:
|
|
149
|
+
lxm: ids.ComAtprotoAdminUpdateSubjectStatus,
|
|
143
150
|
keypair: badKey,
|
|
144
151
|
})
|
|
145
152
|
const attempt = agent.api.com.atproto.admin.updateSubjectStatus(
|
|
@@ -162,7 +169,7 @@ describe('admin auth', () => {
|
|
|
162
169
|
const headers = await createServiceAuthHeaders({
|
|
163
170
|
iss: modServiceDid,
|
|
164
171
|
aud: sc.dids.alice,
|
|
165
|
-
lxm:
|
|
172
|
+
lxm: ids.ComAtprotoAdminUpdateSubjectStatus,
|
|
166
173
|
keypair: modServiceKey,
|
|
167
174
|
})
|
|
168
175
|
const attempt = agent.api.com.atproto.admin.updateSubjectStatus(
|
package/tests/auth.test.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { AtpAgent } from '@atproto/api'
|
|
|
2
2
|
import { SeedClient, TestNetwork, usersSeed } from '@atproto/dev-env'
|
|
3
3
|
import { createServiceJwt } from '@atproto/xrpc-server'
|
|
4
4
|
import { Keypair, Secp256k1Keypair } from '@atproto/crypto'
|
|
5
|
+
import { ids } from '../src/lexicon/lexicons'
|
|
5
6
|
|
|
6
7
|
describe('auth', () => {
|
|
7
8
|
let network: TestNetwork
|
|
@@ -29,7 +30,7 @@ describe('auth', () => {
|
|
|
29
30
|
const jwt = await createServiceJwt({
|
|
30
31
|
iss: issuer,
|
|
31
32
|
aud: network.bsky.ctx.cfg.serverDid,
|
|
32
|
-
lxm:
|
|
33
|
+
lxm: ids.AppBskyActorGetProfile,
|
|
33
34
|
keypair,
|
|
34
35
|
})
|
|
35
36
|
return agent.api.app.bsky.actor.getProfile(
|
|
@@ -59,6 +59,7 @@ Array [
|
|
|
59
59
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
60
60
|
"labels": Array [],
|
|
61
61
|
"likeCount": 0,
|
|
62
|
+
"quoteCount": 0,
|
|
62
63
|
"record": Object {
|
|
63
64
|
"$type": "app.bsky.feed.post",
|
|
64
65
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
@@ -68,6 +69,7 @@ Array [
|
|
|
68
69
|
"repostCount": 0,
|
|
69
70
|
"uri": "record(2)",
|
|
70
71
|
"viewer": Object {
|
|
72
|
+
"embeddingDisabled": false,
|
|
71
73
|
"threadMuted": false,
|
|
72
74
|
},
|
|
73
75
|
},
|
|
@@ -87,6 +89,7 @@ Array [
|
|
|
87
89
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
88
90
|
"labels": Array [],
|
|
89
91
|
"likeCount": 0,
|
|
92
|
+
"quoteCount": 0,
|
|
90
93
|
"record": Object {
|
|
91
94
|
"$type": "app.bsky.feed.post",
|
|
92
95
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
@@ -106,6 +109,7 @@ Array [
|
|
|
106
109
|
"repostCount": 1,
|
|
107
110
|
"uri": "record(3)",
|
|
108
111
|
"viewer": Object {
|
|
112
|
+
"embeddingDisabled": false,
|
|
109
113
|
"threadMuted": false,
|
|
110
114
|
},
|
|
111
115
|
},
|
|
@@ -164,6 +168,7 @@ Array [
|
|
|
164
168
|
},
|
|
165
169
|
],
|
|
166
170
|
"likeCount": 0,
|
|
171
|
+
"quoteCount": 0,
|
|
167
172
|
"record": Object {
|
|
168
173
|
"$type": "app.bsky.feed.post",
|
|
169
174
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
@@ -199,6 +204,7 @@ Array [
|
|
|
199
204
|
"repostCount": 0,
|
|
200
205
|
"uri": "record(5)",
|
|
201
206
|
"viewer": Object {
|
|
207
|
+
"embeddingDisabled": false,
|
|
202
208
|
"threadMuted": false,
|
|
203
209
|
},
|
|
204
210
|
},
|
|
@@ -217,6 +223,7 @@ Array [
|
|
|
217
223
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
218
224
|
"labels": Array [],
|
|
219
225
|
"likeCount": 3,
|
|
226
|
+
"quoteCount": 0,
|
|
220
227
|
"record": Object {
|
|
221
228
|
"$type": "app.bsky.feed.post",
|
|
222
229
|
"createdAt": "1970-01-01T00:00:00.000000Z",
|
|
@@ -226,6 +233,7 @@ Array [
|
|
|
226
233
|
"repostCount": 1,
|
|
227
234
|
"uri": "record(4)",
|
|
228
235
|
"viewer": Object {
|
|
236
|
+
"embeddingDisabled": false,
|
|
229
237
|
"threadMuted": false,
|
|
230
238
|
},
|
|
231
239
|
},
|
|
@@ -374,6 +382,7 @@ Array [
|
|
|
374
382
|
},
|
|
375
383
|
],
|
|
376
384
|
"likeCount": 2,
|
|
385
|
+
"quoteCount": 0,
|
|
377
386
|
"record": Object {
|
|
378
387
|
"$type": "app.bsky.feed.post",
|
|
379
388
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
@@ -390,6 +399,7 @@ Array [
|
|
|
390
399
|
"repostCount": 0,
|
|
391
400
|
"uri": "record(6)",
|
|
392
401
|
"viewer": Object {
|
|
402
|
+
"embeddingDisabled": false,
|
|
393
403
|
"threadMuted": false,
|
|
394
404
|
},
|
|
395
405
|
},
|
|
@@ -409,6 +419,7 @@ Array [
|
|
|
409
419
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
410
420
|
"labels": Array [],
|
|
411
421
|
"likeCount": 3,
|
|
422
|
+
"quoteCount": 0,
|
|
412
423
|
"record": Object {
|
|
413
424
|
"$type": "app.bsky.feed.post",
|
|
414
425
|
"createdAt": "1970-01-01T00:00:00.000000Z",
|
|
@@ -418,6 +429,7 @@ Array [
|
|
|
418
429
|
"repostCount": 1,
|
|
419
430
|
"uri": "record(4)",
|
|
420
431
|
"viewer": Object {
|
|
432
|
+
"embeddingDisabled": false,
|
|
421
433
|
"threadMuted": false,
|
|
422
434
|
},
|
|
423
435
|
},
|
|
@@ -445,6 +457,7 @@ Array [
|
|
|
445
457
|
},
|
|
446
458
|
],
|
|
447
459
|
"likeCount": 0,
|
|
460
|
+
"quoteCount": 0,
|
|
448
461
|
"record": Object {
|
|
449
462
|
"$type": "app.bsky.feed.post",
|
|
450
463
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
@@ -462,6 +475,7 @@ Array [
|
|
|
462
475
|
"repostCount": 0,
|
|
463
476
|
"uri": "record(12)",
|
|
464
477
|
"viewer": Object {
|
|
478
|
+
"embeddingDisabled": false,
|
|
465
479
|
"threadMuted": false,
|
|
466
480
|
},
|
|
467
481
|
},
|
|
@@ -554,6 +568,7 @@ Object {
|
|
|
554
568
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
555
569
|
"labels": Array [],
|
|
556
570
|
"likeCount": 0,
|
|
571
|
+
"quoteCount": 0,
|
|
557
572
|
"record": Object {
|
|
558
573
|
"$type": "app.bsky.feed.post",
|
|
559
574
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
@@ -577,6 +592,7 @@ Object {
|
|
|
577
592
|
"repostCount": 0,
|
|
578
593
|
"uri": "record(0)",
|
|
579
594
|
"viewer": Object {
|
|
595
|
+
"embeddingDisabled": false,
|
|
580
596
|
"threadMuted": false,
|
|
581
597
|
},
|
|
582
598
|
},
|
|
@@ -621,6 +637,7 @@ Object {
|
|
|
621
637
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
622
638
|
"labels": Array [],
|
|
623
639
|
"likeCount": 0,
|
|
640
|
+
"quoteCount": 0,
|
|
624
641
|
"record": Object {
|
|
625
642
|
"$type": "app.bsky.feed.post",
|
|
626
643
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
@@ -644,6 +661,7 @@ Object {
|
|
|
644
661
|
"repostCount": 0,
|
|
645
662
|
"uri": "record(0)",
|
|
646
663
|
"viewer": Object {
|
|
664
|
+
"embeddingDisabled": false,
|
|
647
665
|
"threadMuted": false,
|
|
648
666
|
},
|
|
649
667
|
},
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DAY } from '@atproto/common'
|
|
2
2
|
import { TestNetwork, SeedClient, usersSeed } from '@atproto/dev-env'
|
|
3
3
|
import { AtpAgent } from '@atproto/api'
|
|
4
|
+
import { ids } from '../../src/lexicon/lexicons'
|
|
4
5
|
|
|
5
6
|
describe('handle invalidation', () => {
|
|
6
7
|
let network: TestNetwork
|
|
@@ -62,7 +63,12 @@ describe('handle invalidation', () => {
|
|
|
62
63
|
|
|
63
64
|
const res = await agent.api.app.bsky.actor.getProfile(
|
|
64
65
|
{ actor: eveAccnt.did },
|
|
65
|
-
{
|
|
66
|
+
{
|
|
67
|
+
headers: await network.serviceHeaders(
|
|
68
|
+
alice,
|
|
69
|
+
ids.AppBskyActorGetProfile,
|
|
70
|
+
),
|
|
71
|
+
},
|
|
66
72
|
)
|
|
67
73
|
expect(res.data.handle).toEqual('handle.invalid')
|
|
68
74
|
})
|
|
@@ -77,7 +83,12 @@ describe('handle invalidation', () => {
|
|
|
77
83
|
await network.processAll()
|
|
78
84
|
const res = await agent.api.app.bsky.actor.getProfile(
|
|
79
85
|
{ actor: alice },
|
|
80
|
-
{
|
|
86
|
+
{
|
|
87
|
+
headers: await network.serviceHeaders(
|
|
88
|
+
alice,
|
|
89
|
+
ids.AppBskyActorGetProfile,
|
|
90
|
+
),
|
|
91
|
+
},
|
|
81
92
|
)
|
|
82
93
|
expect(res.data.handle).toEqual('handle.invalid')
|
|
83
94
|
})
|
|
@@ -92,7 +103,12 @@ describe('handle invalidation', () => {
|
|
|
92
103
|
await network.processAll()
|
|
93
104
|
const res = await agent.api.app.bsky.actor.getProfile(
|
|
94
105
|
{ actor: alice },
|
|
95
|
-
{
|
|
106
|
+
{
|
|
107
|
+
headers: await network.serviceHeaders(
|
|
108
|
+
alice,
|
|
109
|
+
ids.AppBskyActorGetProfile,
|
|
110
|
+
),
|
|
111
|
+
},
|
|
96
112
|
)
|
|
97
113
|
expect(res.data.handle).toEqual(sc.accounts[alice].handle)
|
|
98
114
|
})
|
|
@@ -112,13 +128,23 @@ describe('handle invalidation', () => {
|
|
|
112
128
|
|
|
113
129
|
const aliceRes = await agent.api.app.bsky.actor.getProfile(
|
|
114
130
|
{ actor: alice },
|
|
115
|
-
{
|
|
131
|
+
{
|
|
132
|
+
headers: await network.serviceHeaders(
|
|
133
|
+
alice,
|
|
134
|
+
ids.AppBskyActorGetProfile,
|
|
135
|
+
),
|
|
136
|
+
},
|
|
116
137
|
)
|
|
117
138
|
expect(aliceRes.data.handle).toEqual('handle.invalid')
|
|
118
139
|
|
|
119
140
|
const bobRes = await agent.api.app.bsky.actor.getProfile(
|
|
120
141
|
{ actor: bob },
|
|
121
|
-
{
|
|
142
|
+
{
|
|
143
|
+
headers: await network.serviceHeaders(
|
|
144
|
+
alice,
|
|
145
|
+
ids.AppBskyActorGetProfile,
|
|
146
|
+
),
|
|
147
|
+
},
|
|
122
148
|
)
|
|
123
149
|
expect(bobRes.data.handle).toEqual(sc.accounts[alice].handle)
|
|
124
150
|
})
|
|
@@ -97,7 +97,12 @@ describe('indexing', () => {
|
|
|
97
97
|
|
|
98
98
|
const getAfterCreate = await agent.api.app.bsky.feed.getPostThread(
|
|
99
99
|
{ uri: uri.toString() },
|
|
100
|
-
{
|
|
100
|
+
{
|
|
101
|
+
headers: await network.serviceHeaders(
|
|
102
|
+
sc.dids.alice,
|
|
103
|
+
ids.AppBskyFeedGetPostThread,
|
|
104
|
+
),
|
|
105
|
+
},
|
|
101
106
|
)
|
|
102
107
|
expect(forSnapshot(getAfterCreate.data)).toMatchSnapshot()
|
|
103
108
|
const createNotifications = await getNotifications(db, uri)
|
|
@@ -107,7 +112,12 @@ describe('indexing', () => {
|
|
|
107
112
|
|
|
108
113
|
const getAfterUpdate = await agent.api.app.bsky.feed.getPostThread(
|
|
109
114
|
{ uri: uri.toString() },
|
|
110
|
-
{
|
|
115
|
+
{
|
|
116
|
+
headers: await network.serviceHeaders(
|
|
117
|
+
sc.dids.alice,
|
|
118
|
+
ids.AppBskyFeedGetPostThread,
|
|
119
|
+
),
|
|
120
|
+
},
|
|
111
121
|
)
|
|
112
122
|
expect(forSnapshot(getAfterUpdate.data)).toMatchSnapshot()
|
|
113
123
|
const updateNotifications = await getNotifications(db, uri)
|
|
@@ -117,7 +127,12 @@ describe('indexing', () => {
|
|
|
117
127
|
|
|
118
128
|
const getAfterDelete = agent.api.app.bsky.feed.getPostThread(
|
|
119
129
|
{ uri: uri.toString() },
|
|
120
|
-
{
|
|
130
|
+
{
|
|
131
|
+
headers: await network.serviceHeaders(
|
|
132
|
+
sc.dids.alice,
|
|
133
|
+
ids.AppBskyFeedGetPostThread,
|
|
134
|
+
),
|
|
135
|
+
},
|
|
121
136
|
)
|
|
122
137
|
await expect(getAfterDelete).rejects.toThrow(/Post not found:/)
|
|
123
138
|
const deleteNotifications = await getNotifications(db, uri)
|
|
@@ -162,7 +177,12 @@ describe('indexing', () => {
|
|
|
162
177
|
|
|
163
178
|
const getAfterCreate = await agent.api.app.bsky.actor.getProfile(
|
|
164
179
|
{ actor: sc.dids.dan },
|
|
165
|
-
{
|
|
180
|
+
{
|
|
181
|
+
headers: await network.serviceHeaders(
|
|
182
|
+
sc.dids.alice,
|
|
183
|
+
ids.AppBskyActorGetProfile,
|
|
184
|
+
),
|
|
185
|
+
},
|
|
166
186
|
)
|
|
167
187
|
expect(forSnapshot(getAfterCreate.data)).toMatchSnapshot()
|
|
168
188
|
|
|
@@ -171,7 +191,12 @@ describe('indexing', () => {
|
|
|
171
191
|
|
|
172
192
|
const getAfterUpdate = await agent.api.app.bsky.actor.getProfile(
|
|
173
193
|
{ actor: sc.dids.dan },
|
|
174
|
-
{
|
|
194
|
+
{
|
|
195
|
+
headers: await network.serviceHeaders(
|
|
196
|
+
sc.dids.alice,
|
|
197
|
+
ids.AppBskyActorGetProfile,
|
|
198
|
+
),
|
|
199
|
+
},
|
|
175
200
|
)
|
|
176
201
|
expect(forSnapshot(getAfterUpdate.data)).toMatchSnapshot()
|
|
177
202
|
|
|
@@ -180,7 +205,12 @@ describe('indexing', () => {
|
|
|
180
205
|
|
|
181
206
|
const getAfterDelete = await agent.api.app.bsky.actor.getProfile(
|
|
182
207
|
{ actor: sc.dids.dan },
|
|
183
|
-
{
|
|
208
|
+
{
|
|
209
|
+
headers: await network.serviceHeaders(
|
|
210
|
+
sc.dids.alice,
|
|
211
|
+
ids.AppBskyActorGetProfile,
|
|
212
|
+
),
|
|
213
|
+
},
|
|
184
214
|
)
|
|
185
215
|
expect(forSnapshot(getAfterDelete.data)).toMatchSnapshot()
|
|
186
216
|
})
|
|
@@ -247,6 +277,7 @@ describe('indexing', () => {
|
|
|
247
277
|
replyCount: 1,
|
|
248
278
|
repostCount: 1,
|
|
249
279
|
likeCount: 1,
|
|
280
|
+
quoteCount: 0,
|
|
250
281
|
})
|
|
251
282
|
// Cleanup
|
|
252
283
|
const del = (uri: AtUri) => {
|
|
@@ -331,7 +362,12 @@ describe('indexing', () => {
|
|
|
331
362
|
data: { notifications },
|
|
332
363
|
} = await agent.api.app.bsky.notification.listNotifications(
|
|
333
364
|
{},
|
|
334
|
-
{
|
|
365
|
+
{
|
|
366
|
+
headers: await network.serviceHeaders(
|
|
367
|
+
sc.dids.bob,
|
|
368
|
+
ids.AppBskyNotificationListNotifications,
|
|
369
|
+
),
|
|
370
|
+
},
|
|
335
371
|
)
|
|
336
372
|
|
|
337
373
|
expect(notifications).toHaveLength(2)
|
|
@@ -404,15 +440,30 @@ describe('indexing', () => {
|
|
|
404
440
|
// Mark originals
|
|
405
441
|
const { data: origProfile } = await agent.api.app.bsky.actor.getProfile(
|
|
406
442
|
{ actor: sc.dids.alice },
|
|
407
|
-
{
|
|
443
|
+
{
|
|
444
|
+
headers: await network.serviceHeaders(
|
|
445
|
+
sc.dids.alice,
|
|
446
|
+
ids.AppBskyActorGetProfile,
|
|
447
|
+
),
|
|
448
|
+
},
|
|
408
449
|
)
|
|
409
450
|
const { data: origFeed } = await agent.api.app.bsky.feed.getAuthorFeed(
|
|
410
451
|
{ actor: sc.dids.alice },
|
|
411
|
-
{
|
|
452
|
+
{
|
|
453
|
+
headers: await network.serviceHeaders(
|
|
454
|
+
sc.dids.alice,
|
|
455
|
+
ids.AppBskyFeedGetAuthorFeed,
|
|
456
|
+
),
|
|
457
|
+
},
|
|
412
458
|
)
|
|
413
459
|
const { data: origFollows } = await agent.api.app.bsky.graph.getFollows(
|
|
414
460
|
{ actor: sc.dids.alice },
|
|
415
|
-
{
|
|
461
|
+
{
|
|
462
|
+
headers: await network.serviceHeaders(
|
|
463
|
+
sc.dids.alice,
|
|
464
|
+
ids.AppBskyGraphGetFollows,
|
|
465
|
+
),
|
|
466
|
+
},
|
|
416
467
|
)
|
|
417
468
|
// Index
|
|
418
469
|
const { data: commit } =
|
|
@@ -424,15 +475,30 @@ describe('indexing', () => {
|
|
|
424
475
|
// Check
|
|
425
476
|
const { data: profile } = await agent.api.app.bsky.actor.getProfile(
|
|
426
477
|
{ actor: sc.dids.alice },
|
|
427
|
-
{
|
|
478
|
+
{
|
|
479
|
+
headers: await network.serviceHeaders(
|
|
480
|
+
sc.dids.alice,
|
|
481
|
+
ids.AppBskyActorGetProfile,
|
|
482
|
+
),
|
|
483
|
+
},
|
|
428
484
|
)
|
|
429
485
|
const { data: feed } = await agent.api.app.bsky.feed.getAuthorFeed(
|
|
430
486
|
{ actor: sc.dids.alice },
|
|
431
|
-
{
|
|
487
|
+
{
|
|
488
|
+
headers: await network.serviceHeaders(
|
|
489
|
+
sc.dids.alice,
|
|
490
|
+
ids.AppBskyFeedGetAuthorFeed,
|
|
491
|
+
),
|
|
492
|
+
},
|
|
432
493
|
)
|
|
433
494
|
const { data: follows } = await agent.api.app.bsky.graph.getFollows(
|
|
434
495
|
{ actor: sc.dids.alice },
|
|
435
|
-
{
|
|
496
|
+
{
|
|
497
|
+
headers: await network.serviceHeaders(
|
|
498
|
+
sc.dids.alice,
|
|
499
|
+
ids.AppBskyGraphGetFollows,
|
|
500
|
+
),
|
|
501
|
+
},
|
|
436
502
|
)
|
|
437
503
|
expect(forSnapshot([origProfile, origFeed, origFollows])).toEqual(
|
|
438
504
|
forSnapshot([profile, feed, follows]),
|
|
@@ -468,15 +534,30 @@ describe('indexing', () => {
|
|
|
468
534
|
// Check
|
|
469
535
|
const { data: profile } = await agent.api.app.bsky.actor.getProfile(
|
|
470
536
|
{ actor: sc.dids.alice },
|
|
471
|
-
{
|
|
537
|
+
{
|
|
538
|
+
headers: await network.serviceHeaders(
|
|
539
|
+
sc.dids.alice,
|
|
540
|
+
ids.AppBskyActorGetProfile,
|
|
541
|
+
),
|
|
542
|
+
},
|
|
472
543
|
)
|
|
473
544
|
const { data: feed } = await agent.api.app.bsky.feed.getAuthorFeed(
|
|
474
545
|
{ actor: sc.dids.alice },
|
|
475
|
-
{
|
|
546
|
+
{
|
|
547
|
+
headers: await network.serviceHeaders(
|
|
548
|
+
sc.dids.alice,
|
|
549
|
+
ids.AppBskyFeedGetAuthorFeed,
|
|
550
|
+
),
|
|
551
|
+
},
|
|
476
552
|
)
|
|
477
553
|
const { data: follows } = await agent.api.app.bsky.graph.getFollows(
|
|
478
554
|
{ actor: sc.dids.alice },
|
|
479
|
-
{
|
|
555
|
+
{
|
|
556
|
+
headers: await network.serviceHeaders(
|
|
557
|
+
sc.dids.alice,
|
|
558
|
+
ids.AppBskyGraphGetFollows,
|
|
559
|
+
),
|
|
560
|
+
},
|
|
480
561
|
)
|
|
481
562
|
expect(profile.description).toEqual('freshening things up')
|
|
482
563
|
expect(feed.feed[0].post.uri).toEqual(newPost.ref.uriStr)
|
|
@@ -525,12 +606,22 @@ describe('indexing', () => {
|
|
|
525
606
|
// Check
|
|
526
607
|
const getGoodPost = agent.api.app.bsky.feed.getPostThread(
|
|
527
608
|
{ uri: writes[0].uri.toString(), depth: 0 },
|
|
528
|
-
{
|
|
609
|
+
{
|
|
610
|
+
headers: await network.serviceHeaders(
|
|
611
|
+
sc.dids.alice,
|
|
612
|
+
ids.AppBskyFeedGetPostThread,
|
|
613
|
+
),
|
|
614
|
+
},
|
|
529
615
|
)
|
|
530
616
|
await expect(getGoodPost).resolves.toBeDefined()
|
|
531
617
|
const getBadPost = agent.api.app.bsky.feed.getPostThread(
|
|
532
618
|
{ uri: writes[1].uri.toString(), depth: 0 },
|
|
533
|
-
{
|
|
619
|
+
{
|
|
620
|
+
headers: await network.serviceHeaders(
|
|
621
|
+
sc.dids.alice,
|
|
622
|
+
ids.AppBskyFeedGetPostThread,
|
|
623
|
+
),
|
|
624
|
+
},
|
|
534
625
|
)
|
|
535
626
|
await expect(getBadPost).rejects.toThrow('Post not found')
|
|
536
627
|
})
|
|
@@ -540,7 +631,12 @@ describe('indexing', () => {
|
|
|
540
631
|
const getIndexedHandle = async (did) => {
|
|
541
632
|
const res = await agent.api.app.bsky.actor.getProfile(
|
|
542
633
|
{ actor: did },
|
|
543
|
-
{
|
|
634
|
+
{
|
|
635
|
+
headers: await network.serviceHeaders(
|
|
636
|
+
sc.dids.alice,
|
|
637
|
+
ids.AppBskyActorGetProfile,
|
|
638
|
+
),
|
|
639
|
+
},
|
|
544
640
|
)
|
|
545
641
|
return res.data.handle
|
|
546
642
|
}
|
|
@@ -618,13 +714,23 @@ describe('indexing', () => {
|
|
|
618
714
|
it('does not unindex actor when they are still being hosted by their pds', async () => {
|
|
619
715
|
const { data: profileBefore } = await agent.api.app.bsky.actor.getProfile(
|
|
620
716
|
{ actor: sc.dids.alice },
|
|
621
|
-
{
|
|
717
|
+
{
|
|
718
|
+
headers: await network.serviceHeaders(
|
|
719
|
+
sc.dids.bob,
|
|
720
|
+
ids.AppBskyActorGetProfile,
|
|
721
|
+
),
|
|
722
|
+
},
|
|
622
723
|
)
|
|
623
724
|
// Attempt indexing tombstone
|
|
624
725
|
await network.bsky.sub.indexingSvc.deleteActor(sc.dids.alice)
|
|
625
726
|
const { data: profileAfter } = await agent.api.app.bsky.actor.getProfile(
|
|
626
727
|
{ actor: sc.dids.alice },
|
|
627
|
-
{
|
|
728
|
+
{
|
|
729
|
+
headers: await network.serviceHeaders(
|
|
730
|
+
sc.dids.bob,
|
|
731
|
+
ids.AppBskyActorGetProfile,
|
|
732
|
+
),
|
|
733
|
+
},
|
|
628
734
|
)
|
|
629
735
|
expect(profileAfter).toEqual(profileBefore)
|
|
630
736
|
})
|
|
@@ -633,7 +739,12 @@ describe('indexing', () => {
|
|
|
633
739
|
const { alice } = sc.dids
|
|
634
740
|
const getProfileBefore = agent.api.app.bsky.actor.getProfile(
|
|
635
741
|
{ actor: alice },
|
|
636
|
-
{
|
|
742
|
+
{
|
|
743
|
+
headers: await network.serviceHeaders(
|
|
744
|
+
sc.dids.bob,
|
|
745
|
+
ids.AppBskyActorGetProfile,
|
|
746
|
+
),
|
|
747
|
+
},
|
|
637
748
|
)
|
|
638
749
|
await expect(getProfileBefore).resolves.toBeDefined()
|
|
639
750
|
// Delete account on pds
|
|
@@ -651,7 +762,12 @@ describe('indexing', () => {
|
|
|
651
762
|
await network.bsky.sub.indexingSvc.deleteActor(alice)
|
|
652
763
|
const getProfileAfter = agent.api.app.bsky.actor.getProfile(
|
|
653
764
|
{ actor: alice },
|
|
654
|
-
{
|
|
765
|
+
{
|
|
766
|
+
headers: await network.serviceHeaders(
|
|
767
|
+
sc.dids.bob,
|
|
768
|
+
ids.AppBskyActorGetProfile,
|
|
769
|
+
),
|
|
770
|
+
},
|
|
655
771
|
)
|
|
656
772
|
await expect(getProfileAfter).rejects.toThrow('Profile not found')
|
|
657
773
|
})
|