@atproto/bsky 0.0.15 → 0.0.16
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 +11 -0
- package/dist/api/com/atproto/moderation/util.d.ts +4 -3
- package/dist/context.d.ts +15 -0
- package/dist/db/index.js +26 -1
- package/dist/db/index.js.map +3 -3
- package/dist/db/migrations/20231003T202833377Z-create-moderation-subject-status.d.ts +3 -0
- package/dist/db/migrations/index.d.ts +1 -0
- package/dist/db/pagination.d.ts +2 -1
- package/dist/db/{periodic-moderation-action-reversal.d.ts → periodic-moderation-event-reversal.d.ts} +3 -5
- package/dist/db/tables/moderation.d.ts +24 -34
- package/dist/feed-gen/types.d.ts +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2750 -2121
- package/dist/index.js.map +3 -3
- package/dist/lexicon/index.d.ts +11 -18
- package/dist/lexicon/lexicons.d.ts +414 -399
- package/dist/lexicon/types/app/bsky/feed/defs.d.ts +1 -7
- package/dist/lexicon/types/app/bsky/graph/defs.d.ts +1 -0
- package/dist/lexicon/types/com/atproto/admin/defs.d.ts +114 -48
- package/dist/lexicon/types/com/atproto/admin/{takeModerationAction.d.ts → emitModerationEvent.d.ts} +5 -6
- package/dist/lexicon/types/com/atproto/admin/{getModerationAction.d.ts → getModerationEvent.d.ts} +1 -1
- package/dist/lexicon/types/com/atproto/admin/{getModerationActions.d.ts → queryModerationEvents.d.ts} +5 -1
- package/dist/lexicon/types/com/atproto/admin/{getModerationReports.d.ts → queryModerationStatuses.d.ts} +12 -6
- package/dist/lexicon/types/com/atproto/admin/sendEmail.d.ts +1 -0
- package/dist/migrate-moderation-data.d.ts +1 -0
- package/dist/services/actor/views.d.ts +2 -5
- package/dist/services/feed/index.d.ts +1 -0
- package/dist/services/feed/util.d.ts +9 -1
- package/dist/services/feed/views.d.ts +6 -17
- package/dist/services/graph/index.d.ts +5 -29
- package/dist/services/graph/types.d.ts +1 -0
- package/dist/services/moderation/index.d.ts +135 -72
- package/dist/services/moderation/pagination.d.ts +36 -0
- package/dist/services/moderation/status.d.ts +13 -0
- package/dist/services/moderation/types.d.ts +35 -0
- package/dist/services/moderation/views.d.ts +18 -14
- package/dist/util/debug.d.ts +1 -1
- package/package.json +11 -11
- package/src/api/app/bsky/feed/getActorFeeds.ts +2 -1
- package/src/api/app/bsky/feed/getActorLikes.ts +1 -3
- package/src/api/app/bsky/feed/getAuthorFeed.ts +1 -3
- package/src/api/app/bsky/feed/getFeed.ts +9 -9
- package/src/api/app/bsky/feed/getFeedGenerator.ts +3 -0
- package/src/api/app/bsky/feed/getFeedGenerators.ts +2 -1
- package/src/api/app/bsky/feed/getListFeed.ts +1 -3
- package/src/api/app/bsky/feed/getPostThread.ts +15 -54
- package/src/api/app/bsky/feed/getPosts.ts +21 -18
- package/src/api/app/bsky/feed/getSuggestedFeeds.ts +2 -1
- package/src/api/app/bsky/feed/getTimeline.ts +1 -3
- package/src/api/app/bsky/feed/searchPosts.ts +20 -17
- package/src/api/app/bsky/graph/getList.ts +6 -3
- package/src/api/app/bsky/graph/getListBlocks.ts +3 -2
- package/src/api/app/bsky/graph/getListMutes.ts +2 -1
- package/src/api/app/bsky/graph/getLists.ts +2 -1
- package/src/api/app/bsky/unspecced/getPopularFeedGenerators.ts +3 -1
- package/src/api/blob-resolver.ts +6 -11
- package/src/api/com/atproto/admin/emitModerationEvent.ts +220 -0
- package/src/api/com/atproto/admin/{getModerationActions.ts → getModerationEvent.ts} +5 -11
- package/src/api/com/atproto/admin/getRecord.ts +1 -0
- package/src/api/com/atproto/admin/{getModerationReports.ts → queryModerationEvents.ts} +13 -16
- package/src/api/com/atproto/admin/queryModerationStatuses.ts +55 -0
- package/src/api/com/atproto/moderation/createReport.ts +9 -7
- package/src/api/com/atproto/moderation/util.ts +38 -20
- package/src/api/index.ts +8 -14
- package/src/auth.ts +29 -21
- package/src/auto-moderator/index.ts +26 -19
- package/src/context.ts +4 -0
- package/src/db/migrations/20231003T202833377Z-create-moderation-subject-status.ts +123 -0
- package/src/db/migrations/index.ts +1 -0
- package/src/db/pagination.ts +26 -3
- package/src/db/{periodic-moderation-action-reversal.ts → periodic-moderation-event-reversal.ts} +50 -46
- package/src/db/tables/moderation.ts +35 -52
- package/src/feed-gen/best-of-follows.ts +6 -3
- package/src/feed-gen/bsky-team.ts +1 -1
- package/src/feed-gen/hot-classic.ts +1 -1
- package/src/feed-gen/mutuals.ts +6 -2
- package/src/feed-gen/types.ts +1 -1
- package/src/feed-gen/whats-hot.ts +1 -1
- package/src/feed-gen/with-friends.ts +7 -3
- package/src/index.ts +2 -1
- package/src/lexicon/index.ts +30 -67
- package/src/lexicon/lexicons.ts +526 -491
- package/src/lexicon/types/app/bsky/feed/defs.ts +1 -18
- package/src/lexicon/types/app/bsky/graph/defs.ts +1 -0
- package/src/lexicon/types/com/atproto/admin/defs.ts +276 -84
- package/src/lexicon/types/com/atproto/admin/{takeModerationAction.ts → emitModerationEvent.ts} +13 -11
- package/src/lexicon/types/com/atproto/admin/{getModerationReport.ts → getModerationEvent.ts} +1 -1
- package/src/lexicon/types/com/atproto/admin/{getModerationActions.ts → queryModerationEvents.ts} +8 -1
- package/src/lexicon/types/com/atproto/admin/{getModerationReports.ts → queryModerationStatuses.ts} +21 -14
- package/src/lexicon/types/com/atproto/admin/sendEmail.ts +1 -0
- package/src/migrate-moderation-data.ts +414 -0
- package/src/services/actor/views.ts +5 -14
- package/src/services/feed/index.ts +26 -7
- package/src/services/feed/util.ts +47 -19
- package/src/services/feed/views.ts +68 -4
- package/src/services/graph/index.ts +21 -3
- package/src/services/graph/types.ts +1 -0
- package/src/services/indexing/plugins/block.ts +2 -3
- package/src/services/indexing/plugins/feed-generator.ts +2 -3
- package/src/services/indexing/plugins/follow.ts +2 -3
- package/src/services/indexing/plugins/like.ts +2 -3
- package/src/services/indexing/plugins/list-block.ts +2 -3
- package/src/services/indexing/plugins/list-item.ts +2 -3
- package/src/services/indexing/plugins/list.ts +2 -3
- package/src/services/indexing/plugins/post.ts +3 -4
- package/src/services/indexing/plugins/repost.ts +2 -3
- package/src/services/indexing/plugins/thread-gate.ts +2 -3
- package/src/services/label/index.ts +2 -3
- package/src/services/moderation/index.ts +380 -395
- package/src/services/moderation/pagination.ts +96 -0
- package/src/services/moderation/status.ts +244 -0
- package/src/services/moderation/types.ts +49 -0
- package/src/services/moderation/views.ts +278 -329
- package/src/util/debug.ts +2 -2
- package/tests/__snapshots__/feed-generation.test.ts.snap +322 -6
- package/tests/__snapshots__/indexing.test.ts.snap +0 -6
- package/tests/admin/__snapshots__/get-record.test.ts.snap +30 -132
- package/tests/admin/__snapshots__/get-repo.test.ts.snap +14 -60
- package/tests/admin/__snapshots__/moderation-events.test.ts.snap +146 -0
- package/tests/admin/__snapshots__/moderation-statuses.test.ts.snap +64 -0
- package/tests/admin/__snapshots__/moderation.test.ts.snap +0 -125
- package/tests/admin/get-record.test.ts +5 -9
- package/tests/admin/get-repo.test.ts +5 -9
- package/tests/admin/moderation-events.test.ts +221 -0
- package/tests/admin/moderation-statuses.test.ts +145 -0
- package/tests/admin/moderation.test.ts +512 -860
- package/tests/admin/repo-search.test.ts +2 -3
- package/tests/auto-moderator/fuzzy-matcher.test.ts +2 -1
- package/tests/auto-moderator/takedowns.test.ts +45 -18
- package/tests/feed-generation.test.ts +57 -9
- package/tests/views/__snapshots__/block-lists.test.ts.snap +3 -9
- package/tests/views/__snapshots__/blocks.test.ts.snap +0 -9
- package/tests/views/__snapshots__/mute-lists.test.ts.snap +5 -5
- package/tests/views/__snapshots__/mutes.test.ts.snap +0 -3
- package/tests/views/__snapshots__/thread.test.ts.snap +0 -30
- package/tests/views/actor-search.test.ts +2 -3
- package/tests/views/author-feed.test.ts +42 -36
- package/tests/views/follows.test.ts +40 -35
- package/tests/views/list-feed.test.ts +17 -9
- package/tests/views/notifications.test.ts +13 -9
- package/tests/views/profile.test.ts +20 -18
- package/tests/views/thread.test.ts +54 -26
- package/tests/views/threadgating.test.ts +51 -19
- package/tests/views/timeline.test.ts +21 -13
- package/dist/api/com/atproto/admin/resolveModerationReports.d.ts +0 -3
- package/dist/api/com/atproto/admin/reverseModerationAction.d.ts +0 -3
- package/dist/api/com/atproto/admin/takeModerationAction.d.ts +0 -3
- package/dist/lexicon/types/com/atproto/admin/getModerationReport.d.ts +0 -29
- package/dist/lexicon/types/com/atproto/admin/resolveModerationReports.d.ts +0 -36
- package/dist/lexicon/types/com/atproto/admin/reverseModerationAction.d.ts +0 -36
- package/src/api/com/atproto/admin/getModerationAction.ts +0 -44
- package/src/api/com/atproto/admin/getModerationReport.ts +0 -43
- package/src/api/com/atproto/admin/resolveModerationReports.ts +0 -24
- package/src/api/com/atproto/admin/reverseModerationAction.ts +0 -115
- package/src/api/com/atproto/admin/takeModerationAction.ts +0 -156
- package/src/lexicon/types/com/atproto/admin/getModerationAction.ts +0 -41
- package/src/lexicon/types/com/atproto/admin/resolveModerationReports.ts +0 -49
- package/src/lexicon/types/com/atproto/admin/reverseModerationAction.ts +0 -49
- package/tests/admin/__snapshots__/get-moderation-action.test.ts.snap +0 -172
- package/tests/admin/__snapshots__/get-moderation-actions.test.ts.snap +0 -178
- package/tests/admin/__snapshots__/get-moderation-report.test.ts.snap +0 -177
- package/tests/admin/__snapshots__/get-moderation-reports.test.ts.snap +0 -307
- package/tests/admin/get-moderation-action.test.ts +0 -100
- package/tests/admin/get-moderation-actions.test.ts +0 -164
- package/tests/admin/get-moderation-report.test.ts +0 -100
- package/tests/admin/get-moderation-reports.test.ts +0 -332
- /package/dist/api/com/atproto/admin/{getModerationAction.d.ts → emitModerationEvent.d.ts} +0 -0
- /package/dist/api/com/atproto/admin/{getModerationActions.d.ts → getModerationEvent.d.ts} +0 -0
- /package/dist/api/com/atproto/admin/{getModerationReport.d.ts → queryModerationEvents.d.ts} +0 -0
- /package/dist/api/com/atproto/admin/{getModerationReports.d.ts → queryModerationStatuses.d.ts} +0 -0
package/src/util/debug.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const debugCatch = <Func extends (...args: any[]) => any>(fn: Func) => {
|
|
2
|
-
return async (...args) => {
|
|
2
|
+
return async (...args: Parameters<Func>) => {
|
|
3
3
|
try {
|
|
4
|
-
return await fn(...args)
|
|
4
|
+
return (await fn(...args)) as Awaited<ReturnType<Func>>
|
|
5
5
|
} catch (err) {
|
|
6
6
|
console.error(err)
|
|
7
7
|
throw err
|
|
@@ -204,9 +204,9 @@ Array [
|
|
|
204
204
|
"muted": false,
|
|
205
205
|
},
|
|
206
206
|
},
|
|
207
|
-
"description": "Provides all feed candidates
|
|
207
|
+
"description": "Provides all feed candidates when authed",
|
|
208
208
|
"did": "user(0)",
|
|
209
|
-
"displayName": "
|
|
209
|
+
"displayName": "Needs Auth",
|
|
210
210
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
211
211
|
"likeCount": 0,
|
|
212
212
|
"uri": "record(4)",
|
|
@@ -246,9 +246,9 @@ Array [
|
|
|
246
246
|
"muted": false,
|
|
247
247
|
},
|
|
248
248
|
},
|
|
249
|
-
"description": "Provides
|
|
249
|
+
"description": "Provides all feed candidates, blindly ignoring pagination limit",
|
|
250
250
|
"did": "user(0)",
|
|
251
|
-
"displayName": "
|
|
251
|
+
"displayName": "Bad Pagination",
|
|
252
252
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
253
253
|
"likeCount": 0,
|
|
254
254
|
"uri": "record(5)",
|
|
@@ -288,14 +288,56 @@ Array [
|
|
|
288
288
|
"muted": false,
|
|
289
289
|
},
|
|
290
290
|
},
|
|
291
|
+
"description": "Provides even-indexed feed candidates",
|
|
292
|
+
"did": "user(0)",
|
|
293
|
+
"displayName": "Even",
|
|
294
|
+
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
295
|
+
"likeCount": 0,
|
|
296
|
+
"uri": "record(6)",
|
|
297
|
+
"viewer": Object {},
|
|
298
|
+
},
|
|
299
|
+
Object {
|
|
300
|
+
"cid": "cids(6)",
|
|
301
|
+
"creator": Object {
|
|
302
|
+
"avatar": "https://bsky.public.url/img/avatar/plain/user(2)/cids(1)@jpeg",
|
|
303
|
+
"description": "its me!",
|
|
304
|
+
"did": "user(1)",
|
|
305
|
+
"displayName": "ali",
|
|
306
|
+
"handle": "alice.test",
|
|
307
|
+
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
308
|
+
"labels": Array [
|
|
309
|
+
Object {
|
|
310
|
+
"cid": "cids(2)",
|
|
311
|
+
"cts": "1970-01-01T00:00:00.000Z",
|
|
312
|
+
"neg": false,
|
|
313
|
+
"src": "user(1)",
|
|
314
|
+
"uri": "record(3)",
|
|
315
|
+
"val": "self-label-a",
|
|
316
|
+
},
|
|
317
|
+
Object {
|
|
318
|
+
"cid": "cids(2)",
|
|
319
|
+
"cts": "1970-01-01T00:00:00.000Z",
|
|
320
|
+
"neg": false,
|
|
321
|
+
"src": "user(1)",
|
|
322
|
+
"uri": "record(3)",
|
|
323
|
+
"val": "self-label-b",
|
|
324
|
+
},
|
|
325
|
+
],
|
|
326
|
+
"viewer": Object {
|
|
327
|
+
"blockedBy": false,
|
|
328
|
+
"followedBy": "record(2)",
|
|
329
|
+
"following": "record(1)",
|
|
330
|
+
"muted": false,
|
|
331
|
+
},
|
|
332
|
+
},
|
|
291
333
|
"description": "Provides all feed candidates",
|
|
292
334
|
"did": "user(0)",
|
|
293
335
|
"displayName": "All",
|
|
294
336
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
295
337
|
"likeCount": 2,
|
|
296
|
-
"uri": "record(
|
|
338
|
+
"uri": "record(7)",
|
|
297
339
|
"viewer": Object {
|
|
298
|
-
"like": "record(
|
|
340
|
+
"like": "record(8)",
|
|
299
341
|
},
|
|
300
342
|
},
|
|
301
343
|
]
|
|
@@ -822,6 +864,280 @@ Array [
|
|
|
822
864
|
]
|
|
823
865
|
`;
|
|
824
866
|
|
|
867
|
+
exports[`feed generation getFeed resolves basic feed contents without auth. 1`] = `
|
|
868
|
+
Array [
|
|
869
|
+
Object {
|
|
870
|
+
"post": Object {
|
|
871
|
+
"author": Object {
|
|
872
|
+
"avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(1)@jpeg",
|
|
873
|
+
"did": "user(0)",
|
|
874
|
+
"displayName": "ali",
|
|
875
|
+
"handle": "alice.test",
|
|
876
|
+
"labels": Array [
|
|
877
|
+
Object {
|
|
878
|
+
"cid": "cids(2)",
|
|
879
|
+
"cts": "1970-01-01T00:00:00.000Z",
|
|
880
|
+
"neg": false,
|
|
881
|
+
"src": "user(0)",
|
|
882
|
+
"uri": "record(1)",
|
|
883
|
+
"val": "self-label-a",
|
|
884
|
+
},
|
|
885
|
+
Object {
|
|
886
|
+
"cid": "cids(2)",
|
|
887
|
+
"cts": "1970-01-01T00:00:00.000Z",
|
|
888
|
+
"neg": false,
|
|
889
|
+
"src": "user(0)",
|
|
890
|
+
"uri": "record(1)",
|
|
891
|
+
"val": "self-label-b",
|
|
892
|
+
},
|
|
893
|
+
],
|
|
894
|
+
},
|
|
895
|
+
"cid": "cids(0)",
|
|
896
|
+
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
897
|
+
"labels": Array [
|
|
898
|
+
Object {
|
|
899
|
+
"cid": "cids(0)",
|
|
900
|
+
"cts": "1970-01-01T00:00:00.000Z",
|
|
901
|
+
"neg": false,
|
|
902
|
+
"src": "user(0)",
|
|
903
|
+
"uri": "record(0)",
|
|
904
|
+
"val": "self-label",
|
|
905
|
+
},
|
|
906
|
+
],
|
|
907
|
+
"likeCount": 0,
|
|
908
|
+
"record": Object {
|
|
909
|
+
"$type": "app.bsky.feed.post",
|
|
910
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
911
|
+
"labels": Object {
|
|
912
|
+
"$type": "com.atproto.label.defs#selfLabels",
|
|
913
|
+
"values": Array [
|
|
914
|
+
Object {
|
|
915
|
+
"val": "self-label",
|
|
916
|
+
},
|
|
917
|
+
],
|
|
918
|
+
},
|
|
919
|
+
"text": "hey there",
|
|
920
|
+
},
|
|
921
|
+
"replyCount": 0,
|
|
922
|
+
"repostCount": 0,
|
|
923
|
+
"uri": "record(0)",
|
|
924
|
+
},
|
|
925
|
+
},
|
|
926
|
+
Object {
|
|
927
|
+
"post": Object {
|
|
928
|
+
"author": Object {
|
|
929
|
+
"did": "user(2)",
|
|
930
|
+
"handle": "carol.test",
|
|
931
|
+
"labels": Array [],
|
|
932
|
+
},
|
|
933
|
+
"cid": "cids(3)",
|
|
934
|
+
"embed": Object {
|
|
935
|
+
"$type": "app.bsky.embed.recordWithMedia#view",
|
|
936
|
+
"media": Object {
|
|
937
|
+
"$type": "app.bsky.embed.images#view",
|
|
938
|
+
"images": Array [
|
|
939
|
+
Object {
|
|
940
|
+
"alt": "tests/sample-img/key-landscape-small.jpg",
|
|
941
|
+
"fullsize": "https://bsky.public.url/img/feed_fullsize/plain/user(5)/cids(4)@jpeg",
|
|
942
|
+
"thumb": "https://bsky.public.url/img/feed_thumbnail/plain/user(5)/cids(4)@jpeg",
|
|
943
|
+
},
|
|
944
|
+
Object {
|
|
945
|
+
"alt": "tests/sample-img/key-alt.jpg",
|
|
946
|
+
"fullsize": "https://bsky.public.url/img/feed_fullsize/plain/user(5)/cids(5)@jpeg",
|
|
947
|
+
"thumb": "https://bsky.public.url/img/feed_thumbnail/plain/user(5)/cids(5)@jpeg",
|
|
948
|
+
},
|
|
949
|
+
],
|
|
950
|
+
},
|
|
951
|
+
"record": Object {
|
|
952
|
+
"record": Object {
|
|
953
|
+
"$type": "app.bsky.embed.record#viewRecord",
|
|
954
|
+
"author": Object {
|
|
955
|
+
"avatar": "https://bsky.public.url/img/avatar/plain/user(4)/cids(1)@jpeg",
|
|
956
|
+
"did": "user(3)",
|
|
957
|
+
"displayName": "bobby",
|
|
958
|
+
"handle": "bob.test",
|
|
959
|
+
"labels": Array [],
|
|
960
|
+
},
|
|
961
|
+
"cid": "cids(6)",
|
|
962
|
+
"embeds": Array [],
|
|
963
|
+
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
964
|
+
"labels": Array [],
|
|
965
|
+
"uri": "record(3)",
|
|
966
|
+
"value": Object {
|
|
967
|
+
"$type": "app.bsky.feed.post",
|
|
968
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
969
|
+
"langs": Array [
|
|
970
|
+
"en-US",
|
|
971
|
+
"i-klingon",
|
|
972
|
+
],
|
|
973
|
+
"text": "bob back at it again!",
|
|
974
|
+
},
|
|
975
|
+
},
|
|
976
|
+
},
|
|
977
|
+
},
|
|
978
|
+
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
979
|
+
"labels": Array [],
|
|
980
|
+
"likeCount": 2,
|
|
981
|
+
"record": Object {
|
|
982
|
+
"$type": "app.bsky.feed.post",
|
|
983
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
984
|
+
"embed": Object {
|
|
985
|
+
"$type": "app.bsky.embed.recordWithMedia",
|
|
986
|
+
"media": Object {
|
|
987
|
+
"$type": "app.bsky.embed.images",
|
|
988
|
+
"images": Array [
|
|
989
|
+
Object {
|
|
990
|
+
"alt": "tests/sample-img/key-landscape-small.jpg",
|
|
991
|
+
"image": Object {
|
|
992
|
+
"$type": "blob",
|
|
993
|
+
"mimeType": "image/jpeg",
|
|
994
|
+
"ref": Object {
|
|
995
|
+
"$link": "cids(4)",
|
|
996
|
+
},
|
|
997
|
+
"size": 4114,
|
|
998
|
+
},
|
|
999
|
+
},
|
|
1000
|
+
Object {
|
|
1001
|
+
"alt": "tests/sample-img/key-alt.jpg",
|
|
1002
|
+
"image": Object {
|
|
1003
|
+
"$type": "blob",
|
|
1004
|
+
"mimeType": "image/jpeg",
|
|
1005
|
+
"ref": Object {
|
|
1006
|
+
"$link": "cids(5)",
|
|
1007
|
+
},
|
|
1008
|
+
"size": 12736,
|
|
1009
|
+
},
|
|
1010
|
+
},
|
|
1011
|
+
],
|
|
1012
|
+
},
|
|
1013
|
+
"record": Object {
|
|
1014
|
+
"record": Object {
|
|
1015
|
+
"cid": "cids(6)",
|
|
1016
|
+
"uri": "record(3)",
|
|
1017
|
+
},
|
|
1018
|
+
},
|
|
1019
|
+
},
|
|
1020
|
+
"text": "hi im carol",
|
|
1021
|
+
},
|
|
1022
|
+
"replyCount": 0,
|
|
1023
|
+
"repostCount": 0,
|
|
1024
|
+
"uri": "record(2)",
|
|
1025
|
+
},
|
|
1026
|
+
},
|
|
1027
|
+
Object {
|
|
1028
|
+
"post": Object {
|
|
1029
|
+
"author": Object {
|
|
1030
|
+
"did": "user(2)",
|
|
1031
|
+
"handle": "carol.test",
|
|
1032
|
+
"labels": Array [],
|
|
1033
|
+
},
|
|
1034
|
+
"cid": "cids(7)",
|
|
1035
|
+
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
1036
|
+
"labels": Array [],
|
|
1037
|
+
"likeCount": 0,
|
|
1038
|
+
"record": Object {
|
|
1039
|
+
"$type": "app.bsky.feed.post",
|
|
1040
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
1041
|
+
"reply": Object {
|
|
1042
|
+
"parent": Object {
|
|
1043
|
+
"cid": "cids(8)",
|
|
1044
|
+
"uri": "record(5)",
|
|
1045
|
+
},
|
|
1046
|
+
"root": Object {
|
|
1047
|
+
"cid": "cids(8)",
|
|
1048
|
+
"uri": "record(5)",
|
|
1049
|
+
},
|
|
1050
|
+
},
|
|
1051
|
+
"text": "of course",
|
|
1052
|
+
},
|
|
1053
|
+
"replyCount": 0,
|
|
1054
|
+
"repostCount": 0,
|
|
1055
|
+
"uri": "record(4)",
|
|
1056
|
+
},
|
|
1057
|
+
"reply": Object {
|
|
1058
|
+
"parent": Object {
|
|
1059
|
+
"$type": "app.bsky.feed.defs#postView",
|
|
1060
|
+
"author": Object {
|
|
1061
|
+
"avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(1)@jpeg",
|
|
1062
|
+
"did": "user(0)",
|
|
1063
|
+
"displayName": "ali",
|
|
1064
|
+
"handle": "alice.test",
|
|
1065
|
+
"labels": Array [
|
|
1066
|
+
Object {
|
|
1067
|
+
"cid": "cids(2)",
|
|
1068
|
+
"cts": "1970-01-01T00:00:00.000Z",
|
|
1069
|
+
"neg": false,
|
|
1070
|
+
"src": "user(0)",
|
|
1071
|
+
"uri": "record(1)",
|
|
1072
|
+
"val": "self-label-a",
|
|
1073
|
+
},
|
|
1074
|
+
Object {
|
|
1075
|
+
"cid": "cids(2)",
|
|
1076
|
+
"cts": "1970-01-01T00:00:00.000Z",
|
|
1077
|
+
"neg": false,
|
|
1078
|
+
"src": "user(0)",
|
|
1079
|
+
"uri": "record(1)",
|
|
1080
|
+
"val": "self-label-b",
|
|
1081
|
+
},
|
|
1082
|
+
],
|
|
1083
|
+
},
|
|
1084
|
+
"cid": "cids(8)",
|
|
1085
|
+
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
1086
|
+
"labels": Array [],
|
|
1087
|
+
"likeCount": 3,
|
|
1088
|
+
"record": Object {
|
|
1089
|
+
"$type": "app.bsky.feed.post",
|
|
1090
|
+
"createdAt": "1970-01-01T00:00:00.000000Z",
|
|
1091
|
+
"text": "again",
|
|
1092
|
+
},
|
|
1093
|
+
"replyCount": 2,
|
|
1094
|
+
"repostCount": 1,
|
|
1095
|
+
"uri": "record(5)",
|
|
1096
|
+
},
|
|
1097
|
+
"root": Object {
|
|
1098
|
+
"$type": "app.bsky.feed.defs#postView",
|
|
1099
|
+
"author": Object {
|
|
1100
|
+
"avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(1)@jpeg",
|
|
1101
|
+
"did": "user(0)",
|
|
1102
|
+
"displayName": "ali",
|
|
1103
|
+
"handle": "alice.test",
|
|
1104
|
+
"labels": Array [
|
|
1105
|
+
Object {
|
|
1106
|
+
"cid": "cids(2)",
|
|
1107
|
+
"cts": "1970-01-01T00:00:00.000Z",
|
|
1108
|
+
"neg": false,
|
|
1109
|
+
"src": "user(0)",
|
|
1110
|
+
"uri": "record(1)",
|
|
1111
|
+
"val": "self-label-a",
|
|
1112
|
+
},
|
|
1113
|
+
Object {
|
|
1114
|
+
"cid": "cids(2)",
|
|
1115
|
+
"cts": "1970-01-01T00:00:00.000Z",
|
|
1116
|
+
"neg": false,
|
|
1117
|
+
"src": "user(0)",
|
|
1118
|
+
"uri": "record(1)",
|
|
1119
|
+
"val": "self-label-b",
|
|
1120
|
+
},
|
|
1121
|
+
],
|
|
1122
|
+
},
|
|
1123
|
+
"cid": "cids(8)",
|
|
1124
|
+
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
1125
|
+
"labels": Array [],
|
|
1126
|
+
"likeCount": 3,
|
|
1127
|
+
"record": Object {
|
|
1128
|
+
"$type": "app.bsky.feed.post",
|
|
1129
|
+
"createdAt": "1970-01-01T00:00:00.000000Z",
|
|
1130
|
+
"text": "again",
|
|
1131
|
+
},
|
|
1132
|
+
"replyCount": 2,
|
|
1133
|
+
"repostCount": 1,
|
|
1134
|
+
"uri": "record(5)",
|
|
1135
|
+
},
|
|
1136
|
+
},
|
|
1137
|
+
},
|
|
1138
|
+
]
|
|
1139
|
+
`;
|
|
1140
|
+
|
|
825
1141
|
exports[`feed generation getFeed resolves basic feed contents. 1`] = `
|
|
826
1142
|
Array [
|
|
827
1143
|
Object {
|
|
@@ -518,9 +518,6 @@ Object {
|
|
|
518
518
|
"viewer": Object {},
|
|
519
519
|
},
|
|
520
520
|
"replies": Array [],
|
|
521
|
-
"viewer": Object {
|
|
522
|
-
"canReply": true,
|
|
523
|
-
},
|
|
524
521
|
},
|
|
525
522
|
}
|
|
526
523
|
`;
|
|
@@ -587,9 +584,6 @@ Object {
|
|
|
587
584
|
"viewer": Object {},
|
|
588
585
|
},
|
|
589
586
|
"replies": Array [],
|
|
590
|
-
"viewer": Object {
|
|
591
|
-
"canReply": true,
|
|
592
|
-
},
|
|
593
587
|
},
|
|
594
588
|
}
|
|
595
589
|
`;
|
|
@@ -17,74 +17,23 @@ Object {
|
|
|
17
17
|
},
|
|
18
18
|
],
|
|
19
19
|
"moderation": Object {
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"uri": "record(0)",
|
|
32
|
-
},
|
|
33
|
-
"subjectBlobCids": Array [],
|
|
20
|
+
"subjectStatus": Object {
|
|
21
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
22
|
+
"id": 1,
|
|
23
|
+
"lastReportedAt": "1970-01-01T00:00:00.000Z",
|
|
24
|
+
"lastReviewedAt": "1970-01-01T00:00:00.000Z",
|
|
25
|
+
"lastReviewedBy": "did:example:admin",
|
|
26
|
+
"reviewState": "com.atproto.admin.defs#reviewClosed",
|
|
27
|
+
"subject": Object {
|
|
28
|
+
"$type": "com.atproto.repo.strongRef",
|
|
29
|
+
"cid": "cids(0)",
|
|
30
|
+
"uri": "record(0)",
|
|
34
31
|
},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"id": 1,
|
|
40
|
-
"reason": "X",
|
|
41
|
-
"resolvedReportIds": Array [],
|
|
42
|
-
"reversal": Object {
|
|
43
|
-
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
44
|
-
"createdBy": "did:example:admin",
|
|
45
|
-
"reason": "X",
|
|
46
|
-
},
|
|
47
|
-
"subject": Object {
|
|
48
|
-
"$type": "com.atproto.repo.strongRef",
|
|
49
|
-
"cid": "cids(0)",
|
|
50
|
-
"uri": "record(0)",
|
|
51
|
-
},
|
|
52
|
-
"subjectBlobCids": Array [],
|
|
53
|
-
},
|
|
54
|
-
],
|
|
55
|
-
"currentAction": Object {
|
|
56
|
-
"action": "com.atproto.admin.defs#takedown",
|
|
57
|
-
"id": 2,
|
|
32
|
+
"subjectBlobCids": Array [],
|
|
33
|
+
"subjectRepoHandle": "alice.test",
|
|
34
|
+
"takendown": true,
|
|
35
|
+
"updatedAt": "1970-01-01T00:00:00.000Z",
|
|
58
36
|
},
|
|
59
|
-
"reports": Array [
|
|
60
|
-
Object {
|
|
61
|
-
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
62
|
-
"id": 2,
|
|
63
|
-
"reason": "defamation",
|
|
64
|
-
"reasonType": "com.atproto.moderation.defs#reasonOther",
|
|
65
|
-
"reportedBy": "user(1)",
|
|
66
|
-
"resolvedByActionIds": Array [],
|
|
67
|
-
"subject": Object {
|
|
68
|
-
"$type": "com.atproto.repo.strongRef",
|
|
69
|
-
"cid": "cids(0)",
|
|
70
|
-
"uri": "record(0)",
|
|
71
|
-
},
|
|
72
|
-
"subjectRepoHandle": "alice.test",
|
|
73
|
-
},
|
|
74
|
-
Object {
|
|
75
|
-
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
76
|
-
"id": 1,
|
|
77
|
-
"reasonType": "com.atproto.moderation.defs#reasonSpam",
|
|
78
|
-
"reportedBy": "user(2)",
|
|
79
|
-
"resolvedByActionIds": Array [],
|
|
80
|
-
"subject": Object {
|
|
81
|
-
"$type": "com.atproto.repo.strongRef",
|
|
82
|
-
"cid": "cids(0)",
|
|
83
|
-
"uri": "record(0)",
|
|
84
|
-
},
|
|
85
|
-
"subjectRepoHandle": "alice.test",
|
|
86
|
-
},
|
|
87
|
-
],
|
|
88
37
|
},
|
|
89
38
|
"repo": Object {
|
|
90
39
|
"did": "user(0)",
|
|
@@ -154,74 +103,23 @@ Object {
|
|
|
154
103
|
},
|
|
155
104
|
],
|
|
156
105
|
"moderation": Object {
|
|
157
|
-
"
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
"
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
"uri": "record(0)",
|
|
169
|
-
},
|
|
170
|
-
"subjectBlobCids": Array [],
|
|
106
|
+
"subjectStatus": Object {
|
|
107
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
108
|
+
"id": 1,
|
|
109
|
+
"lastReportedAt": "1970-01-01T00:00:00.000Z",
|
|
110
|
+
"lastReviewedAt": "1970-01-01T00:00:00.000Z",
|
|
111
|
+
"lastReviewedBy": "did:example:admin",
|
|
112
|
+
"reviewState": "com.atproto.admin.defs#reviewClosed",
|
|
113
|
+
"subject": Object {
|
|
114
|
+
"$type": "com.atproto.repo.strongRef",
|
|
115
|
+
"cid": "cids(0)",
|
|
116
|
+
"uri": "record(0)",
|
|
171
117
|
},
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
"id": 1,
|
|
177
|
-
"reason": "X",
|
|
178
|
-
"resolvedReportIds": Array [],
|
|
179
|
-
"reversal": Object {
|
|
180
|
-
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
181
|
-
"createdBy": "did:example:admin",
|
|
182
|
-
"reason": "X",
|
|
183
|
-
},
|
|
184
|
-
"subject": Object {
|
|
185
|
-
"$type": "com.atproto.repo.strongRef",
|
|
186
|
-
"cid": "cids(0)",
|
|
187
|
-
"uri": "record(0)",
|
|
188
|
-
},
|
|
189
|
-
"subjectBlobCids": Array [],
|
|
190
|
-
},
|
|
191
|
-
],
|
|
192
|
-
"currentAction": Object {
|
|
193
|
-
"action": "com.atproto.admin.defs#takedown",
|
|
194
|
-
"id": 2,
|
|
118
|
+
"subjectBlobCids": Array [],
|
|
119
|
+
"subjectRepoHandle": "alice.test",
|
|
120
|
+
"takendown": true,
|
|
121
|
+
"updatedAt": "1970-01-01T00:00:00.000Z",
|
|
195
122
|
},
|
|
196
|
-
"reports": Array [
|
|
197
|
-
Object {
|
|
198
|
-
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
199
|
-
"id": 2,
|
|
200
|
-
"reason": "defamation",
|
|
201
|
-
"reasonType": "com.atproto.moderation.defs#reasonOther",
|
|
202
|
-
"reportedBy": "user(1)",
|
|
203
|
-
"resolvedByActionIds": Array [],
|
|
204
|
-
"subject": Object {
|
|
205
|
-
"$type": "com.atproto.repo.strongRef",
|
|
206
|
-
"cid": "cids(0)",
|
|
207
|
-
"uri": "record(0)",
|
|
208
|
-
},
|
|
209
|
-
"subjectRepoHandle": "alice.test",
|
|
210
|
-
},
|
|
211
|
-
Object {
|
|
212
|
-
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
213
|
-
"id": 1,
|
|
214
|
-
"reasonType": "com.atproto.moderation.defs#reasonSpam",
|
|
215
|
-
"reportedBy": "user(2)",
|
|
216
|
-
"resolvedByActionIds": Array [],
|
|
217
|
-
"subject": Object {
|
|
218
|
-
"$type": "com.atproto.repo.strongRef",
|
|
219
|
-
"cid": "cids(0)",
|
|
220
|
-
"uri": "record(0)",
|
|
221
|
-
},
|
|
222
|
-
"subjectRepoHandle": "alice.test",
|
|
223
|
-
},
|
|
224
|
-
],
|
|
225
123
|
},
|
|
226
124
|
"repo": Object {
|
|
227
125
|
"did": "user(0)",
|
|
@@ -10,68 +10,22 @@ Object {
|
|
|
10
10
|
"invitesDisabled": false,
|
|
11
11
|
"labels": Array [],
|
|
12
12
|
"moderation": Object {
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
"did": "user(0)",
|
|
24
|
-
},
|
|
25
|
-
"subjectBlobCids": Array [],
|
|
26
|
-
},
|
|
27
|
-
Object {
|
|
28
|
-
"action": "com.atproto.admin.defs#acknowledge",
|
|
29
|
-
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
30
|
-
"createdBy": "did:example:admin",
|
|
31
|
-
"id": 1,
|
|
32
|
-
"reason": "X",
|
|
33
|
-
"resolvedReportIds": Array [],
|
|
34
|
-
"reversal": Object {
|
|
35
|
-
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
36
|
-
"createdBy": "did:example:admin",
|
|
37
|
-
"reason": "X",
|
|
38
|
-
},
|
|
39
|
-
"subject": Object {
|
|
40
|
-
"$type": "com.atproto.admin.defs#repoRef",
|
|
41
|
-
"did": "user(0)",
|
|
42
|
-
},
|
|
43
|
-
"subjectBlobCids": Array [],
|
|
13
|
+
"subjectStatus": Object {
|
|
14
|
+
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
15
|
+
"id": 1,
|
|
16
|
+
"lastReportedAt": "1970-01-01T00:00:00.000Z",
|
|
17
|
+
"lastReviewedAt": "1970-01-01T00:00:00.000Z",
|
|
18
|
+
"lastReviewedBy": "did:example:admin",
|
|
19
|
+
"reviewState": "com.atproto.admin.defs#reviewClosed",
|
|
20
|
+
"subject": Object {
|
|
21
|
+
"$type": "com.atproto.admin.defs#repoRef",
|
|
22
|
+
"did": "user(0)",
|
|
44
23
|
},
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"
|
|
48
|
-
"
|
|
24
|
+
"subjectBlobCids": Array [],
|
|
25
|
+
"subjectRepoHandle": "alice.test",
|
|
26
|
+
"takendown": true,
|
|
27
|
+
"updatedAt": "1970-01-01T00:00:00.000Z",
|
|
49
28
|
},
|
|
50
|
-
"reports": Array [
|
|
51
|
-
Object {
|
|
52
|
-
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
53
|
-
"id": 2,
|
|
54
|
-
"reason": "defamation",
|
|
55
|
-
"reasonType": "com.atproto.moderation.defs#reasonOther",
|
|
56
|
-
"reportedBy": "user(1)",
|
|
57
|
-
"resolvedByActionIds": Array [],
|
|
58
|
-
"subject": Object {
|
|
59
|
-
"$type": "com.atproto.admin.defs#repoRef",
|
|
60
|
-
"did": "user(0)",
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
Object {
|
|
64
|
-
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
65
|
-
"id": 1,
|
|
66
|
-
"reasonType": "com.atproto.moderation.defs#reasonSpam",
|
|
67
|
-
"reportedBy": "user(2)",
|
|
68
|
-
"resolvedByActionIds": Array [],
|
|
69
|
-
"subject": Object {
|
|
70
|
-
"$type": "com.atproto.admin.defs#repoRef",
|
|
71
|
-
"did": "user(0)",
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
],
|
|
75
29
|
},
|
|
76
30
|
"relatedRecords": Array [
|
|
77
31
|
Object {
|