* rm tables * rm event-stream & proxied * Remove appview services, move label service to pds * only proxy appview stuff * delete more tables * Start removing message dispatched from pds * more syncing-up removal of message dispatcher in pds * merged * remove feedgens from pds, remove getPopular * remove unused image helper from pds * fixing compiler errors * clean up sharp * rm label service * first pass on cleaning up tests * fix up a bunch of tests * moderation view tests * last admin tests * got a lil overzealous in deletes * clean up unused cfg * clean up label table * simplify admin repo search query/logic * tidy pds entrypoint * in-progress pds config changes * cfg fiddling * finish cleaning up cfg/ctx * comments * building * pds prefix on env * test env * collapse pds migrations down into a single migration * fix up dev-env * tidy * cleanup * fix pds admin tests * fix handle test * fix pds proxy tests * fix subscribe repos test * fix sqlite config in pds tests * add sqlite clause in sequencer-leader * fix actor search w/ sqlite on pds * fixes * fix dev env build * update pds service entrypoint * simple env example * make takedown ids opaque identifiers in the pds * use pds routes for api tests * update pds dockerfile with volume and correct port env var * add a couple env vars to example * add comments to env example * @atproto/pds 0.2.0-beta.0 * @atproto/aws 0.0.1-beta.0 * appview did * @atproto/aws 0.0.1 * enable logs by default * update env example * bugfixing sandbox issues * consistency in pds env var name for appview url * log on pds start and stop, configure version at runtime * @atproto/pds 0.2.0-beta.1 * fix semver matching for pds beta version * v0.2.0-beta.2 * default invites to being not required * fix flaky test * limit db connections in tests * publish 0.2.0-beta.d3 * fix invite required parsing * @atproto/pds 0.2.0-beta.5 * Proxy getPopularFeedGenerators on simplified pds (#1222) proxy getPopularFeedGenerators on pds Co-authored-by: dholms <dtholmgren@gmail.com> * tidy migrations * fix service entry * bump version * change auth order * bump version * bump version * add upgradeRepoVersion & fallback url for cdn * bump version * merging * merge pds * building dev-env * merging tests * merge service entry * test fixing * tidy * fix admin search * tidy * tidy * add snap for getListFeed * add backup nameserver cfg * tidy + pr feedback * tidy * tidy env * bit more * re-add dotenv to root package.json * fix dep * build branch * fix tests * Refactor tests to make better use of dev-env (#1690) * refactor pds tests to use dev env * refactor bsky tests * fix pds test * tidy bsky tests * build pds correctly * fix entry point * default logging to false (for now) * format service entry * Switch takedown ids back to ints on pds distribution (#1694) * switch takedown ids back to ints, consistent with live pds * tidy/fix migration * update migration for sqlite * export moderation action reversal * takedown tests * dont build branch --------- Co-authored-by: Devin Ivy <devinivy@gmail.com>
2064 lines
60 KiB
Plaintext
2064 lines
60 KiB
Plaintext
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`pds author feed views fetches full author feeds for self (sorted, minimal viewer state). 1`] = `
|
|
Array [
|
|
Object {
|
|
"post": Object {
|
|
"author": Object {
|
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(1)@jpeg",
|
|
"did": "user(0)",
|
|
"displayName": "ali",
|
|
"handle": "alice.test",
|
|
"labels": Array [
|
|
Object {
|
|
"cid": "cids(2)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(0)",
|
|
"uri": "record(1)",
|
|
"val": "self-label-a",
|
|
},
|
|
Object {
|
|
"cid": "cids(2)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(0)",
|
|
"uri": "record(1)",
|
|
"val": "self-label-b",
|
|
},
|
|
],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(0)",
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [],
|
|
"likeCount": 0,
|
|
"record": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
"reply": Object {
|
|
"parent": Object {
|
|
"cid": "cids(4)",
|
|
"uri": "record(3)",
|
|
},
|
|
"root": Object {
|
|
"cid": "cids(3)",
|
|
"uri": "record(2)",
|
|
},
|
|
},
|
|
"text": "thanks bob",
|
|
},
|
|
"replyCount": 0,
|
|
"repostCount": 1,
|
|
"uri": "record(0)",
|
|
"viewer": Object {},
|
|
},
|
|
"reply": Object {
|
|
"parent": Object {
|
|
"$type": "app.bsky.feed.defs#postView",
|
|
"author": Object {
|
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(3)/cids(1)@jpeg",
|
|
"did": "user(2)",
|
|
"displayName": "bobby",
|
|
"handle": "bob.test",
|
|
"labels": Array [],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"followedBy": "record(5)",
|
|
"following": "record(4)",
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(4)",
|
|
"embed": Object {
|
|
"$type": "app.bsky.embed.images#view",
|
|
"images": Array [
|
|
Object {
|
|
"alt": "tests/sample-img/key-landscape-small.jpg",
|
|
"fullsize": "https://bsky.public.url/img/feed_fullsize/plain/user(3)/cids(5)@jpeg",
|
|
"thumb": "https://bsky.public.url/img/feed_thumbnail/plain/user(3)/cids(5)@jpeg",
|
|
},
|
|
],
|
|
},
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [
|
|
Object {
|
|
"cid": "cids(4)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "did:example:labeler",
|
|
"uri": "record(3)",
|
|
"val": "test-label",
|
|
},
|
|
Object {
|
|
"cid": "cids(4)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "did:example:labeler",
|
|
"uri": "record(3)",
|
|
"val": "test-label-2",
|
|
},
|
|
],
|
|
"likeCount": 0,
|
|
"record": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
"embed": Object {
|
|
"$type": "app.bsky.embed.images",
|
|
"images": Array [
|
|
Object {
|
|
"alt": "tests/sample-img/key-landscape-small.jpg",
|
|
"image": Object {
|
|
"$type": "blob",
|
|
"mimeType": "image/jpeg",
|
|
"ref": Object {
|
|
"$link": "cids(5)",
|
|
},
|
|
"size": 4114,
|
|
},
|
|
},
|
|
],
|
|
},
|
|
"reply": Object {
|
|
"parent": Object {
|
|
"cid": "cids(3)",
|
|
"uri": "record(2)",
|
|
},
|
|
"root": Object {
|
|
"cid": "cids(3)",
|
|
"uri": "record(2)",
|
|
},
|
|
},
|
|
"text": "hear that label_me label_me_2",
|
|
},
|
|
"replyCount": 1,
|
|
"repostCount": 0,
|
|
"uri": "record(3)",
|
|
"viewer": Object {},
|
|
},
|
|
"root": Object {
|
|
"$type": "app.bsky.feed.defs#postView",
|
|
"author": Object {
|
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(1)@jpeg",
|
|
"did": "user(0)",
|
|
"displayName": "ali",
|
|
"handle": "alice.test",
|
|
"labels": Array [
|
|
Object {
|
|
"cid": "cids(2)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(0)",
|
|
"uri": "record(1)",
|
|
"val": "self-label-a",
|
|
},
|
|
Object {
|
|
"cid": "cids(2)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(0)",
|
|
"uri": "record(1)",
|
|
"val": "self-label-b",
|
|
},
|
|
],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(3)",
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [],
|
|
"likeCount": 3,
|
|
"record": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000000Z",
|
|
"text": "again",
|
|
},
|
|
"replyCount": 2,
|
|
"repostCount": 1,
|
|
"uri": "record(2)",
|
|
"viewer": Object {},
|
|
},
|
|
},
|
|
},
|
|
Object {
|
|
"post": Object {
|
|
"author": Object {
|
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(1)@jpeg",
|
|
"did": "user(0)",
|
|
"displayName": "ali",
|
|
"handle": "alice.test",
|
|
"labels": Array [
|
|
Object {
|
|
"cid": "cids(2)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(0)",
|
|
"uri": "record(1)",
|
|
"val": "self-label-a",
|
|
},
|
|
Object {
|
|
"cid": "cids(2)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(0)",
|
|
"uri": "record(1)",
|
|
"val": "self-label-b",
|
|
},
|
|
],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(6)",
|
|
"embed": Object {
|
|
"$type": "app.bsky.embed.record#view",
|
|
"record": Object {
|
|
"$type": "app.bsky.embed.record#viewRecord",
|
|
"author": Object {
|
|
"did": "user(4)",
|
|
"handle": "dan.test",
|
|
"labels": Array [],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"following": "record(8)",
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(7)",
|
|
"embeds": Array [
|
|
Object {
|
|
"$type": "app.bsky.embed.record#view",
|
|
"record": Object {
|
|
"$type": "app.bsky.embed.record#viewRecord",
|
|
"author": Object {
|
|
"did": "user(5)",
|
|
"handle": "carol.test",
|
|
"labels": Array [],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"followedBy": "record(11)",
|
|
"following": "record(10)",
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(8)",
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [],
|
|
"uri": "record(9)",
|
|
"value": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
"embed": Object {
|
|
"$type": "app.bsky.embed.recordWithMedia",
|
|
"media": Object {
|
|
"$type": "app.bsky.embed.images",
|
|
"images": Array [
|
|
Object {
|
|
"alt": "tests/sample-img/key-landscape-small.jpg",
|
|
"image": Object {
|
|
"$type": "blob",
|
|
"mimeType": "image/jpeg",
|
|
"ref": Object {
|
|
"$link": "cids(5)",
|
|
},
|
|
"size": 4114,
|
|
},
|
|
},
|
|
Object {
|
|
"alt": "tests/sample-img/key-alt.jpg",
|
|
"image": Object {
|
|
"$type": "blob",
|
|
"mimeType": "image/jpeg",
|
|
"ref": Object {
|
|
"$link": "cids(9)",
|
|
},
|
|
"size": 12736,
|
|
},
|
|
},
|
|
],
|
|
},
|
|
"record": Object {
|
|
"record": Object {
|
|
"cid": "cids(10)",
|
|
"uri": "record(12)",
|
|
},
|
|
},
|
|
},
|
|
"text": "hi im carol",
|
|
},
|
|
},
|
|
},
|
|
],
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [],
|
|
"uri": "record(7)",
|
|
"value": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
"embed": Object {
|
|
"$type": "app.bsky.embed.record",
|
|
"record": Object {
|
|
"cid": "cids(8)",
|
|
"uri": "record(9)",
|
|
},
|
|
},
|
|
"facets": Array [
|
|
Object {
|
|
"features": Array [
|
|
Object {
|
|
"$type": "app.bsky.richtext.facet#mention",
|
|
"did": "user(0)",
|
|
},
|
|
],
|
|
"index": Object {
|
|
"byteEnd": 18,
|
|
"byteStart": 0,
|
|
},
|
|
},
|
|
],
|
|
"text": "@alice.bluesky.xyz is the best",
|
|
},
|
|
},
|
|
},
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [
|
|
Object {
|
|
"cid": "cids(6)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "did:example:labeler",
|
|
"uri": "record(6)",
|
|
"val": "test-label",
|
|
},
|
|
],
|
|
"likeCount": 2,
|
|
"record": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
"embed": Object {
|
|
"$type": "app.bsky.embed.record",
|
|
"record": Object {
|
|
"cid": "cids(7)",
|
|
"uri": "record(7)",
|
|
},
|
|
},
|
|
"text": "yoohoo label_me",
|
|
},
|
|
"replyCount": 0,
|
|
"repostCount": 0,
|
|
"uri": "record(6)",
|
|
"viewer": Object {},
|
|
},
|
|
},
|
|
Object {
|
|
"post": Object {
|
|
"author": Object {
|
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(1)@jpeg",
|
|
"did": "user(0)",
|
|
"displayName": "ali",
|
|
"handle": "alice.test",
|
|
"labels": Array [
|
|
Object {
|
|
"cid": "cids(2)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(0)",
|
|
"uri": "record(1)",
|
|
"val": "self-label-a",
|
|
},
|
|
Object {
|
|
"cid": "cids(2)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(0)",
|
|
"uri": "record(1)",
|
|
"val": "self-label-b",
|
|
},
|
|
],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(3)",
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [],
|
|
"likeCount": 3,
|
|
"record": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000000Z",
|
|
"text": "again",
|
|
},
|
|
"replyCount": 2,
|
|
"repostCount": 1,
|
|
"uri": "record(2)",
|
|
"viewer": Object {},
|
|
},
|
|
},
|
|
Object {
|
|
"post": Object {
|
|
"author": Object {
|
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(1)@jpeg",
|
|
"did": "user(0)",
|
|
"displayName": "ali",
|
|
"handle": "alice.test",
|
|
"labels": Array [
|
|
Object {
|
|
"cid": "cids(2)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(0)",
|
|
"uri": "record(1)",
|
|
"val": "self-label-a",
|
|
},
|
|
Object {
|
|
"cid": "cids(2)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(0)",
|
|
"uri": "record(1)",
|
|
"val": "self-label-b",
|
|
},
|
|
],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(11)",
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [
|
|
Object {
|
|
"cid": "cids(11)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(0)",
|
|
"uri": "record(13)",
|
|
"val": "self-label",
|
|
},
|
|
],
|
|
"likeCount": 0,
|
|
"record": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Object {
|
|
"$type": "com.atproto.label.defs#selfLabels",
|
|
"values": Array [
|
|
Object {
|
|
"val": "self-label",
|
|
},
|
|
],
|
|
},
|
|
"text": "hey there",
|
|
},
|
|
"replyCount": 0,
|
|
"repostCount": 0,
|
|
"uri": "record(13)",
|
|
"viewer": Object {},
|
|
},
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`pds author feed views fetches full author feeds for self (sorted, minimal viewer state). 2`] = `
|
|
Array [
|
|
Object {
|
|
"post": Object {
|
|
"author": Object {
|
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(1)@jpeg",
|
|
"did": "user(0)",
|
|
"displayName": "bobby",
|
|
"handle": "bob.test",
|
|
"labels": Array [],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(0)",
|
|
"embed": Object {
|
|
"$type": "app.bsky.embed.images#view",
|
|
"images": Array [
|
|
Object {
|
|
"alt": "tests/sample-img/key-landscape-small.jpg",
|
|
"fullsize": "https://bsky.public.url/img/feed_fullsize/plain/user(1)/cids(2)@jpeg",
|
|
"thumb": "https://bsky.public.url/img/feed_thumbnail/plain/user(1)/cids(2)@jpeg",
|
|
},
|
|
],
|
|
},
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [
|
|
Object {
|
|
"cid": "cids(0)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "did:example:labeler",
|
|
"uri": "record(0)",
|
|
"val": "test-label",
|
|
},
|
|
Object {
|
|
"cid": "cids(0)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "did:example:labeler",
|
|
"uri": "record(0)",
|
|
"val": "test-label-2",
|
|
},
|
|
],
|
|
"likeCount": 0,
|
|
"record": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
"embed": Object {
|
|
"$type": "app.bsky.embed.images",
|
|
"images": Array [
|
|
Object {
|
|
"alt": "tests/sample-img/key-landscape-small.jpg",
|
|
"image": Object {
|
|
"$type": "blob",
|
|
"mimeType": "image/jpeg",
|
|
"ref": Object {
|
|
"$link": "cids(2)",
|
|
},
|
|
"size": 4114,
|
|
},
|
|
},
|
|
],
|
|
},
|
|
"reply": Object {
|
|
"parent": Object {
|
|
"cid": "cids(3)",
|
|
"uri": "record(1)",
|
|
},
|
|
"root": Object {
|
|
"cid": "cids(3)",
|
|
"uri": "record(1)",
|
|
},
|
|
},
|
|
"text": "hear that label_me label_me_2",
|
|
},
|
|
"replyCount": 1,
|
|
"repostCount": 0,
|
|
"uri": "record(0)",
|
|
"viewer": Object {},
|
|
},
|
|
"reply": Object {
|
|
"parent": Object {
|
|
"$type": "app.bsky.feed.defs#postView",
|
|
"author": Object {
|
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(3)/cids(1)@jpeg",
|
|
"did": "user(2)",
|
|
"displayName": "ali",
|
|
"handle": "alice.test",
|
|
"labels": Array [
|
|
Object {
|
|
"cid": "cids(4)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(2)",
|
|
"uri": "record(4)",
|
|
"val": "self-label-a",
|
|
},
|
|
Object {
|
|
"cid": "cids(4)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(2)",
|
|
"uri": "record(4)",
|
|
"val": "self-label-b",
|
|
},
|
|
],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"followedBy": "record(3)",
|
|
"following": "record(2)",
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(3)",
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [],
|
|
"likeCount": 3,
|
|
"record": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000000Z",
|
|
"text": "again",
|
|
},
|
|
"replyCount": 2,
|
|
"repostCount": 1,
|
|
"uri": "record(1)",
|
|
"viewer": Object {
|
|
"like": "record(5)",
|
|
},
|
|
},
|
|
"root": Object {
|
|
"$type": "app.bsky.feed.defs#postView",
|
|
"author": Object {
|
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(3)/cids(1)@jpeg",
|
|
"did": "user(2)",
|
|
"displayName": "ali",
|
|
"handle": "alice.test",
|
|
"labels": Array [
|
|
Object {
|
|
"cid": "cids(4)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(2)",
|
|
"uri": "record(4)",
|
|
"val": "self-label-a",
|
|
},
|
|
Object {
|
|
"cid": "cids(4)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(2)",
|
|
"uri": "record(4)",
|
|
"val": "self-label-b",
|
|
},
|
|
],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"followedBy": "record(3)",
|
|
"following": "record(2)",
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(3)",
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [],
|
|
"likeCount": 3,
|
|
"record": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000000Z",
|
|
"text": "again",
|
|
},
|
|
"replyCount": 2,
|
|
"repostCount": 1,
|
|
"uri": "record(1)",
|
|
"viewer": Object {
|
|
"like": "record(5)",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
Object {
|
|
"post": Object {
|
|
"author": Object {
|
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(1)@jpeg",
|
|
"did": "user(0)",
|
|
"displayName": "bobby",
|
|
"handle": "bob.test",
|
|
"labels": Array [],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(5)",
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [],
|
|
"likeCount": 0,
|
|
"record": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000+00:00",
|
|
"text": "bobby boy here",
|
|
},
|
|
"replyCount": 0,
|
|
"repostCount": 0,
|
|
"uri": "record(6)",
|
|
"viewer": Object {},
|
|
},
|
|
},
|
|
Object {
|
|
"post": Object {
|
|
"author": Object {
|
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(1)@jpeg",
|
|
"did": "user(0)",
|
|
"displayName": "bobby",
|
|
"handle": "bob.test",
|
|
"labels": Array [],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(6)",
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [],
|
|
"likeCount": 0,
|
|
"record": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
"langs": Array [
|
|
"en-US",
|
|
"i-klingon",
|
|
],
|
|
"text": "bob back at it again!",
|
|
},
|
|
"replyCount": 0,
|
|
"repostCount": 0,
|
|
"uri": "record(7)",
|
|
"viewer": Object {},
|
|
},
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`pds author feed views fetches full author feeds for self (sorted, minimal viewer state). 3`] = `
|
|
Array [
|
|
Object {
|
|
"post": Object {
|
|
"author": Object {
|
|
"did": "user(0)",
|
|
"handle": "dan.test",
|
|
"labels": Array [],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(0)",
|
|
"embed": Object {
|
|
"$type": "app.bsky.embed.record#view",
|
|
"record": Object {
|
|
"$type": "app.bsky.embed.record#viewRecord",
|
|
"author": Object {
|
|
"did": "user(2)",
|
|
"handle": "carol.test",
|
|
"labels": Array [],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(1)",
|
|
"embeds": Array [
|
|
Object {
|
|
"$type": "app.bsky.embed.recordWithMedia#view",
|
|
"media": Object {
|
|
"$type": "app.bsky.embed.images#view",
|
|
"images": Array [
|
|
Object {
|
|
"alt": "tests/sample-img/key-landscape-small.jpg",
|
|
"fullsize": "https://bsky.public.url/img/feed_fullsize/plain/user(5)/cids(2)@jpeg",
|
|
"thumb": "https://bsky.public.url/img/feed_thumbnail/plain/user(5)/cids(2)@jpeg",
|
|
},
|
|
Object {
|
|
"alt": "tests/sample-img/key-alt.jpg",
|
|
"fullsize": "https://bsky.public.url/img/feed_fullsize/plain/user(5)/cids(3)@jpeg",
|
|
"thumb": "https://bsky.public.url/img/feed_thumbnail/plain/user(5)/cids(3)@jpeg",
|
|
},
|
|
],
|
|
},
|
|
"record": Object {
|
|
"record": Object {
|
|
"$type": "app.bsky.embed.record#viewRecord",
|
|
"author": Object {
|
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(4)/cids(5)@jpeg",
|
|
"did": "user(3)",
|
|
"displayName": "bobby",
|
|
"handle": "bob.test",
|
|
"labels": Array [],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"followedBy": "record(3)",
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(4)",
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [],
|
|
"uri": "record(2)",
|
|
"value": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
"langs": Array [
|
|
"en-US",
|
|
"i-klingon",
|
|
],
|
|
"text": "bob back at it again!",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [],
|
|
"uri": "record(1)",
|
|
"value": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
"embed": Object {
|
|
"$type": "app.bsky.embed.recordWithMedia",
|
|
"media": Object {
|
|
"$type": "app.bsky.embed.images",
|
|
"images": Array [
|
|
Object {
|
|
"alt": "tests/sample-img/key-landscape-small.jpg",
|
|
"image": Object {
|
|
"$type": "blob",
|
|
"mimeType": "image/jpeg",
|
|
"ref": Object {
|
|
"$link": "cids(2)",
|
|
},
|
|
"size": 4114,
|
|
},
|
|
},
|
|
Object {
|
|
"alt": "tests/sample-img/key-alt.jpg",
|
|
"image": Object {
|
|
"$type": "blob",
|
|
"mimeType": "image/jpeg",
|
|
"ref": Object {
|
|
"$link": "cids(3)",
|
|
},
|
|
"size": 12736,
|
|
},
|
|
},
|
|
],
|
|
},
|
|
"record": Object {
|
|
"record": Object {
|
|
"cid": "cids(4)",
|
|
"uri": "record(2)",
|
|
},
|
|
},
|
|
},
|
|
"text": "hi im carol",
|
|
},
|
|
},
|
|
},
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [],
|
|
"likeCount": 0,
|
|
"record": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
"embed": Object {
|
|
"$type": "app.bsky.embed.record",
|
|
"record": Object {
|
|
"cid": "cids(1)",
|
|
"uri": "record(1)",
|
|
},
|
|
},
|
|
"facets": Array [
|
|
Object {
|
|
"features": Array [
|
|
Object {
|
|
"$type": "app.bsky.richtext.facet#mention",
|
|
"did": "user(1)",
|
|
},
|
|
],
|
|
"index": Object {
|
|
"byteEnd": 18,
|
|
"byteStart": 0,
|
|
},
|
|
},
|
|
],
|
|
"text": "@alice.bluesky.xyz is the best",
|
|
},
|
|
"replyCount": 0,
|
|
"repostCount": 1,
|
|
"uri": "record(0)",
|
|
"viewer": Object {
|
|
"repost": "record(4)",
|
|
},
|
|
},
|
|
"reason": Object {
|
|
"$type": "app.bsky.feed.defs#reasonRepost",
|
|
"by": Object {
|
|
"did": "user(2)",
|
|
"handle": "carol.test",
|
|
"labels": Array [],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"muted": false,
|
|
},
|
|
},
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
},
|
|
},
|
|
Object {
|
|
"post": Object {
|
|
"author": Object {
|
|
"did": "user(2)",
|
|
"handle": "carol.test",
|
|
"labels": Array [],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(6)",
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [],
|
|
"likeCount": 0,
|
|
"record": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
"reply": Object {
|
|
"parent": Object {
|
|
"cid": "cids(7)",
|
|
"uri": "record(6)",
|
|
},
|
|
"root": Object {
|
|
"cid": "cids(7)",
|
|
"uri": "record(6)",
|
|
},
|
|
},
|
|
"text": "of course",
|
|
},
|
|
"replyCount": 0,
|
|
"repostCount": 0,
|
|
"uri": "record(5)",
|
|
"viewer": Object {},
|
|
},
|
|
"reply": Object {
|
|
"parent": Object {
|
|
"$type": "app.bsky.feed.defs#postView",
|
|
"author": Object {
|
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(6)/cids(5)@jpeg",
|
|
"did": "user(1)",
|
|
"displayName": "ali",
|
|
"handle": "alice.test",
|
|
"labels": Array [
|
|
Object {
|
|
"cid": "cids(8)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(1)",
|
|
"uri": "record(9)",
|
|
"val": "self-label-a",
|
|
},
|
|
Object {
|
|
"cid": "cids(8)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(1)",
|
|
"uri": "record(9)",
|
|
"val": "self-label-b",
|
|
},
|
|
],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"followedBy": "record(8)",
|
|
"following": "record(7)",
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(7)",
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [],
|
|
"likeCount": 3,
|
|
"record": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000000Z",
|
|
"text": "again",
|
|
},
|
|
"replyCount": 2,
|
|
"repostCount": 1,
|
|
"uri": "record(6)",
|
|
"viewer": Object {
|
|
"like": "record(10)",
|
|
},
|
|
},
|
|
"root": Object {
|
|
"$type": "app.bsky.feed.defs#postView",
|
|
"author": Object {
|
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(6)/cids(5)@jpeg",
|
|
"did": "user(1)",
|
|
"displayName": "ali",
|
|
"handle": "alice.test",
|
|
"labels": Array [
|
|
Object {
|
|
"cid": "cids(8)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(1)",
|
|
"uri": "record(9)",
|
|
"val": "self-label-a",
|
|
},
|
|
Object {
|
|
"cid": "cids(8)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(1)",
|
|
"uri": "record(9)",
|
|
"val": "self-label-b",
|
|
},
|
|
],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"followedBy": "record(8)",
|
|
"following": "record(7)",
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(7)",
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [],
|
|
"likeCount": 3,
|
|
"record": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000000Z",
|
|
"text": "again",
|
|
},
|
|
"replyCount": 2,
|
|
"repostCount": 1,
|
|
"uri": "record(6)",
|
|
"viewer": Object {
|
|
"like": "record(10)",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
Object {
|
|
"post": Object {
|
|
"author": Object {
|
|
"did": "user(2)",
|
|
"handle": "carol.test",
|
|
"labels": Array [],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(1)",
|
|
"embed": Object {
|
|
"$type": "app.bsky.embed.recordWithMedia#view",
|
|
"media": Object {
|
|
"$type": "app.bsky.embed.images#view",
|
|
"images": Array [
|
|
Object {
|
|
"alt": "tests/sample-img/key-landscape-small.jpg",
|
|
"fullsize": "https://bsky.public.url/img/feed_fullsize/plain/user(5)/cids(2)@jpeg",
|
|
"thumb": "https://bsky.public.url/img/feed_thumbnail/plain/user(5)/cids(2)@jpeg",
|
|
},
|
|
Object {
|
|
"alt": "tests/sample-img/key-alt.jpg",
|
|
"fullsize": "https://bsky.public.url/img/feed_fullsize/plain/user(5)/cids(3)@jpeg",
|
|
"thumb": "https://bsky.public.url/img/feed_thumbnail/plain/user(5)/cids(3)@jpeg",
|
|
},
|
|
],
|
|
},
|
|
"record": Object {
|
|
"record": Object {
|
|
"$type": "app.bsky.embed.record#viewRecord",
|
|
"author": Object {
|
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(4)/cids(5)@jpeg",
|
|
"did": "user(3)",
|
|
"displayName": "bobby",
|
|
"handle": "bob.test",
|
|
"labels": Array [],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"followedBy": "record(3)",
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(4)",
|
|
"embeds": Array [],
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [],
|
|
"uri": "record(2)",
|
|
"value": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
"langs": Array [
|
|
"en-US",
|
|
"i-klingon",
|
|
],
|
|
"text": "bob back at it again!",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [],
|
|
"likeCount": 2,
|
|
"record": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
"embed": Object {
|
|
"$type": "app.bsky.embed.recordWithMedia",
|
|
"media": Object {
|
|
"$type": "app.bsky.embed.images",
|
|
"images": Array [
|
|
Object {
|
|
"alt": "tests/sample-img/key-landscape-small.jpg",
|
|
"image": Object {
|
|
"$type": "blob",
|
|
"mimeType": "image/jpeg",
|
|
"ref": Object {
|
|
"$link": "cids(2)",
|
|
},
|
|
"size": 4114,
|
|
},
|
|
},
|
|
Object {
|
|
"alt": "tests/sample-img/key-alt.jpg",
|
|
"image": Object {
|
|
"$type": "blob",
|
|
"mimeType": "image/jpeg",
|
|
"ref": Object {
|
|
"$link": "cids(3)",
|
|
},
|
|
"size": 12736,
|
|
},
|
|
},
|
|
],
|
|
},
|
|
"record": Object {
|
|
"record": Object {
|
|
"cid": "cids(4)",
|
|
"uri": "record(2)",
|
|
},
|
|
},
|
|
},
|
|
"text": "hi im carol",
|
|
},
|
|
"replyCount": 0,
|
|
"repostCount": 0,
|
|
"uri": "record(1)",
|
|
"viewer": Object {},
|
|
},
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`pds author feed views fetches full author feeds for self (sorted, minimal viewer state). 4`] = `
|
|
Array [
|
|
Object {
|
|
"post": Object {
|
|
"author": Object {
|
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(1)@jpeg",
|
|
"did": "user(0)",
|
|
"displayName": "ali",
|
|
"handle": "alice.test",
|
|
"labels": Array [
|
|
Object {
|
|
"cid": "cids(2)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(0)",
|
|
"uri": "record(2)",
|
|
"val": "self-label-a",
|
|
},
|
|
Object {
|
|
"cid": "cids(2)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(0)",
|
|
"uri": "record(2)",
|
|
"val": "self-label-b",
|
|
},
|
|
],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"followedBy": "record(1)",
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(0)",
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [],
|
|
"likeCount": 0,
|
|
"record": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
"reply": Object {
|
|
"parent": Object {
|
|
"cid": "cids(4)",
|
|
"uri": "record(4)",
|
|
},
|
|
"root": Object {
|
|
"cid": "cids(3)",
|
|
"uri": "record(3)",
|
|
},
|
|
},
|
|
"text": "thanks bob",
|
|
},
|
|
"replyCount": 0,
|
|
"repostCount": 1,
|
|
"uri": "record(0)",
|
|
"viewer": Object {
|
|
"repost": "record(5)",
|
|
},
|
|
},
|
|
"reason": Object {
|
|
"$type": "app.bsky.feed.defs#reasonRepost",
|
|
"by": Object {
|
|
"did": "user(2)",
|
|
"handle": "dan.test",
|
|
"labels": Array [],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"muted": false,
|
|
},
|
|
},
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
},
|
|
"reply": Object {
|
|
"parent": Object {
|
|
"$type": "app.bsky.feed.defs#postView",
|
|
"author": Object {
|
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(4)/cids(1)@jpeg",
|
|
"did": "user(3)",
|
|
"displayName": "bobby",
|
|
"handle": "bob.test",
|
|
"labels": Array [],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"following": "record(8)",
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(4)",
|
|
"embed": Object {
|
|
"$type": "app.bsky.embed.images#view",
|
|
"images": Array [
|
|
Object {
|
|
"alt": "tests/sample-img/key-landscape-small.jpg",
|
|
"fullsize": "https://bsky.public.url/img/feed_fullsize/plain/user(4)/cids(5)@jpeg",
|
|
"thumb": "https://bsky.public.url/img/feed_thumbnail/plain/user(4)/cids(5)@jpeg",
|
|
},
|
|
],
|
|
},
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [
|
|
Object {
|
|
"cid": "cids(4)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "did:example:labeler",
|
|
"uri": "record(4)",
|
|
"val": "test-label",
|
|
},
|
|
Object {
|
|
"cid": "cids(4)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "did:example:labeler",
|
|
"uri": "record(4)",
|
|
"val": "test-label-2",
|
|
},
|
|
],
|
|
"likeCount": 0,
|
|
"record": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
"embed": Object {
|
|
"$type": "app.bsky.embed.images",
|
|
"images": Array [
|
|
Object {
|
|
"alt": "tests/sample-img/key-landscape-small.jpg",
|
|
"image": Object {
|
|
"$type": "blob",
|
|
"mimeType": "image/jpeg",
|
|
"ref": Object {
|
|
"$link": "cids(5)",
|
|
},
|
|
"size": 4114,
|
|
},
|
|
},
|
|
],
|
|
},
|
|
"reply": Object {
|
|
"parent": Object {
|
|
"cid": "cids(3)",
|
|
"uri": "record(3)",
|
|
},
|
|
"root": Object {
|
|
"cid": "cids(3)",
|
|
"uri": "record(3)",
|
|
},
|
|
},
|
|
"text": "hear that label_me label_me_2",
|
|
},
|
|
"replyCount": 1,
|
|
"repostCount": 0,
|
|
"uri": "record(4)",
|
|
"viewer": Object {},
|
|
},
|
|
"root": Object {
|
|
"$type": "app.bsky.feed.defs#postView",
|
|
"author": Object {
|
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(1)@jpeg",
|
|
"did": "user(0)",
|
|
"displayName": "ali",
|
|
"handle": "alice.test",
|
|
"labels": Array [
|
|
Object {
|
|
"cid": "cids(2)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(0)",
|
|
"uri": "record(2)",
|
|
"val": "self-label-a",
|
|
},
|
|
Object {
|
|
"cid": "cids(2)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(0)",
|
|
"uri": "record(2)",
|
|
"val": "self-label-b",
|
|
},
|
|
],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"followedBy": "record(1)",
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(3)",
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [],
|
|
"likeCount": 3,
|
|
"record": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000000Z",
|
|
"text": "again",
|
|
},
|
|
"replyCount": 2,
|
|
"repostCount": 1,
|
|
"uri": "record(3)",
|
|
"viewer": Object {
|
|
"like": "record(7)",
|
|
"repost": "record(6)",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
Object {
|
|
"post": Object {
|
|
"author": Object {
|
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(1)@jpeg",
|
|
"did": "user(0)",
|
|
"displayName": "ali",
|
|
"handle": "alice.test",
|
|
"labels": Array [
|
|
Object {
|
|
"cid": "cids(2)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(0)",
|
|
"uri": "record(2)",
|
|
"val": "self-label-a",
|
|
},
|
|
Object {
|
|
"cid": "cids(2)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(0)",
|
|
"uri": "record(2)",
|
|
"val": "self-label-b",
|
|
},
|
|
],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"followedBy": "record(1)",
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(3)",
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [],
|
|
"likeCount": 3,
|
|
"record": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000000Z",
|
|
"text": "again",
|
|
},
|
|
"replyCount": 2,
|
|
"repostCount": 1,
|
|
"uri": "record(3)",
|
|
"viewer": Object {
|
|
"like": "record(7)",
|
|
"repost": "record(6)",
|
|
},
|
|
},
|
|
"reason": Object {
|
|
"$type": "app.bsky.feed.defs#reasonRepost",
|
|
"by": Object {
|
|
"did": "user(2)",
|
|
"handle": "dan.test",
|
|
"labels": Array [],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"muted": false,
|
|
},
|
|
},
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
},
|
|
},
|
|
Object {
|
|
"post": Object {
|
|
"author": Object {
|
|
"did": "user(2)",
|
|
"handle": "dan.test",
|
|
"labels": Array [],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(6)",
|
|
"embed": Object {
|
|
"$type": "app.bsky.embed.record#view",
|
|
"record": Object {
|
|
"$type": "app.bsky.embed.record#viewRecord",
|
|
"author": Object {
|
|
"did": "user(5)",
|
|
"handle": "carol.test",
|
|
"labels": Array [],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(7)",
|
|
"embeds": Array [
|
|
Object {
|
|
"$type": "app.bsky.embed.recordWithMedia#view",
|
|
"media": Object {
|
|
"$type": "app.bsky.embed.images#view",
|
|
"images": Array [
|
|
Object {
|
|
"alt": "tests/sample-img/key-landscape-small.jpg",
|
|
"fullsize": "https://bsky.public.url/img/feed_fullsize/plain/user(6)/cids(5)@jpeg",
|
|
"thumb": "https://bsky.public.url/img/feed_thumbnail/plain/user(6)/cids(5)@jpeg",
|
|
},
|
|
Object {
|
|
"alt": "tests/sample-img/key-alt.jpg",
|
|
"fullsize": "https://bsky.public.url/img/feed_fullsize/plain/user(6)/cids(8)@jpeg",
|
|
"thumb": "https://bsky.public.url/img/feed_thumbnail/plain/user(6)/cids(8)@jpeg",
|
|
},
|
|
],
|
|
},
|
|
"record": Object {
|
|
"record": Object {
|
|
"$type": "app.bsky.embed.record#viewRecord",
|
|
"author": Object {
|
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(4)/cids(1)@jpeg",
|
|
"did": "user(3)",
|
|
"displayName": "bobby",
|
|
"handle": "bob.test",
|
|
"labels": Array [],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"following": "record(8)",
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(9)",
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [],
|
|
"uri": "record(11)",
|
|
"value": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
"langs": Array [
|
|
"en-US",
|
|
"i-klingon",
|
|
],
|
|
"text": "bob back at it again!",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [],
|
|
"uri": "record(10)",
|
|
"value": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
"embed": Object {
|
|
"$type": "app.bsky.embed.recordWithMedia",
|
|
"media": Object {
|
|
"$type": "app.bsky.embed.images",
|
|
"images": Array [
|
|
Object {
|
|
"alt": "tests/sample-img/key-landscape-small.jpg",
|
|
"image": Object {
|
|
"$type": "blob",
|
|
"mimeType": "image/jpeg",
|
|
"ref": Object {
|
|
"$link": "cids(5)",
|
|
},
|
|
"size": 4114,
|
|
},
|
|
},
|
|
Object {
|
|
"alt": "tests/sample-img/key-alt.jpg",
|
|
"image": Object {
|
|
"$type": "blob",
|
|
"mimeType": "image/jpeg",
|
|
"ref": Object {
|
|
"$link": "cids(8)",
|
|
},
|
|
"size": 12736,
|
|
},
|
|
},
|
|
],
|
|
},
|
|
"record": Object {
|
|
"record": Object {
|
|
"cid": "cids(9)",
|
|
"uri": "record(11)",
|
|
},
|
|
},
|
|
},
|
|
"text": "hi im carol",
|
|
},
|
|
},
|
|
},
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [],
|
|
"likeCount": 0,
|
|
"record": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
"embed": Object {
|
|
"$type": "app.bsky.embed.record",
|
|
"record": Object {
|
|
"cid": "cids(7)",
|
|
"uri": "record(10)",
|
|
},
|
|
},
|
|
"facets": Array [
|
|
Object {
|
|
"features": Array [
|
|
Object {
|
|
"$type": "app.bsky.richtext.facet#mention",
|
|
"did": "user(0)",
|
|
},
|
|
],
|
|
"index": Object {
|
|
"byteEnd": 18,
|
|
"byteStart": 0,
|
|
},
|
|
},
|
|
],
|
|
"text": "@alice.bluesky.xyz is the best",
|
|
},
|
|
"replyCount": 0,
|
|
"repostCount": 1,
|
|
"uri": "record(9)",
|
|
"viewer": Object {},
|
|
},
|
|
},
|
|
Object {
|
|
"post": Object {
|
|
"author": Object {
|
|
"did": "user(2)",
|
|
"handle": "dan.test",
|
|
"labels": Array [],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(10)",
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [],
|
|
"likeCount": 0,
|
|
"record": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
"text": "dan here!",
|
|
},
|
|
"replyCount": 0,
|
|
"repostCount": 0,
|
|
"uri": "record(12)",
|
|
"viewer": Object {},
|
|
},
|
|
},
|
|
]
|
|
`;
|
|
|
|
exports[`pds author feed views reflects fetching user's state in the feed. 1`] = `
|
|
Array [
|
|
Object {
|
|
"post": Object {
|
|
"author": Object {
|
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(1)@jpeg",
|
|
"did": "user(0)",
|
|
"displayName": "ali",
|
|
"handle": "alice.test",
|
|
"labels": Array [
|
|
Object {
|
|
"cid": "cids(2)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(0)",
|
|
"uri": "record(3)",
|
|
"val": "self-label-a",
|
|
},
|
|
Object {
|
|
"cid": "cids(2)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(0)",
|
|
"uri": "record(3)",
|
|
"val": "self-label-b",
|
|
},
|
|
],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"followedBy": "record(2)",
|
|
"following": "record(1)",
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(0)",
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [],
|
|
"likeCount": 0,
|
|
"record": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
"reply": Object {
|
|
"parent": Object {
|
|
"cid": "cids(4)",
|
|
"uri": "record(5)",
|
|
},
|
|
"root": Object {
|
|
"cid": "cids(3)",
|
|
"uri": "record(4)",
|
|
},
|
|
},
|
|
"text": "thanks bob",
|
|
},
|
|
"replyCount": 0,
|
|
"repostCount": 1,
|
|
"uri": "record(0)",
|
|
"viewer": Object {},
|
|
},
|
|
"reply": Object {
|
|
"parent": Object {
|
|
"$type": "app.bsky.feed.defs#postView",
|
|
"author": Object {
|
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(3)/cids(1)@jpeg",
|
|
"did": "user(2)",
|
|
"displayName": "bobby",
|
|
"handle": "bob.test",
|
|
"labels": Array [],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"followedBy": "record(7)",
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(4)",
|
|
"embed": Object {
|
|
"$type": "app.bsky.embed.images#view",
|
|
"images": Array [
|
|
Object {
|
|
"alt": "tests/sample-img/key-landscape-small.jpg",
|
|
"fullsize": "https://bsky.public.url/img/feed_fullsize/plain/user(3)/cids(5)@jpeg",
|
|
"thumb": "https://bsky.public.url/img/feed_thumbnail/plain/user(3)/cids(5)@jpeg",
|
|
},
|
|
],
|
|
},
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [
|
|
Object {
|
|
"cid": "cids(4)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "did:example:labeler",
|
|
"uri": "record(5)",
|
|
"val": "test-label",
|
|
},
|
|
Object {
|
|
"cid": "cids(4)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "did:example:labeler",
|
|
"uri": "record(5)",
|
|
"val": "test-label-2",
|
|
},
|
|
],
|
|
"likeCount": 0,
|
|
"record": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
"embed": Object {
|
|
"$type": "app.bsky.embed.images",
|
|
"images": Array [
|
|
Object {
|
|
"alt": "tests/sample-img/key-landscape-small.jpg",
|
|
"image": Object {
|
|
"$type": "blob",
|
|
"mimeType": "image/jpeg",
|
|
"ref": Object {
|
|
"$link": "cids(5)",
|
|
},
|
|
"size": 4114,
|
|
},
|
|
},
|
|
],
|
|
},
|
|
"reply": Object {
|
|
"parent": Object {
|
|
"cid": "cids(3)",
|
|
"uri": "record(4)",
|
|
},
|
|
"root": Object {
|
|
"cid": "cids(3)",
|
|
"uri": "record(4)",
|
|
},
|
|
},
|
|
"text": "hear that label_me label_me_2",
|
|
},
|
|
"replyCount": 1,
|
|
"repostCount": 0,
|
|
"uri": "record(5)",
|
|
"viewer": Object {},
|
|
},
|
|
"root": Object {
|
|
"$type": "app.bsky.feed.defs#postView",
|
|
"author": Object {
|
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(1)@jpeg",
|
|
"did": "user(0)",
|
|
"displayName": "ali",
|
|
"handle": "alice.test",
|
|
"labels": Array [
|
|
Object {
|
|
"cid": "cids(2)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(0)",
|
|
"uri": "record(3)",
|
|
"val": "self-label-a",
|
|
},
|
|
Object {
|
|
"cid": "cids(2)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(0)",
|
|
"uri": "record(3)",
|
|
"val": "self-label-b",
|
|
},
|
|
],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"followedBy": "record(2)",
|
|
"following": "record(1)",
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(3)",
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [],
|
|
"likeCount": 3,
|
|
"record": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000000Z",
|
|
"text": "again",
|
|
},
|
|
"replyCount": 2,
|
|
"repostCount": 1,
|
|
"uri": "record(4)",
|
|
"viewer": Object {
|
|
"like": "record(6)",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
Object {
|
|
"post": Object {
|
|
"author": Object {
|
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(1)@jpeg",
|
|
"did": "user(0)",
|
|
"displayName": "ali",
|
|
"handle": "alice.test",
|
|
"labels": Array [
|
|
Object {
|
|
"cid": "cids(2)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(0)",
|
|
"uri": "record(3)",
|
|
"val": "self-label-a",
|
|
},
|
|
Object {
|
|
"cid": "cids(2)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(0)",
|
|
"uri": "record(3)",
|
|
"val": "self-label-b",
|
|
},
|
|
],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"followedBy": "record(2)",
|
|
"following": "record(1)",
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(6)",
|
|
"embed": Object {
|
|
"$type": "app.bsky.embed.record#view",
|
|
"record": Object {
|
|
"$type": "app.bsky.embed.record#viewRecord",
|
|
"author": Object {
|
|
"did": "user(4)",
|
|
"handle": "dan.test",
|
|
"labels": Array [],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(7)",
|
|
"embeds": Array [
|
|
Object {
|
|
"$type": "app.bsky.embed.record#view",
|
|
"record": Object {
|
|
"$type": "app.bsky.embed.record#viewRecord",
|
|
"author": Object {
|
|
"did": "user(5)",
|
|
"handle": "carol.test",
|
|
"labels": Array [],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(8)",
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [],
|
|
"uri": "record(10)",
|
|
"value": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
"embed": Object {
|
|
"$type": "app.bsky.embed.recordWithMedia",
|
|
"media": Object {
|
|
"$type": "app.bsky.embed.images",
|
|
"images": Array [
|
|
Object {
|
|
"alt": "tests/sample-img/key-landscape-small.jpg",
|
|
"image": Object {
|
|
"$type": "blob",
|
|
"mimeType": "image/jpeg",
|
|
"ref": Object {
|
|
"$link": "cids(5)",
|
|
},
|
|
"size": 4114,
|
|
},
|
|
},
|
|
Object {
|
|
"alt": "tests/sample-img/key-alt.jpg",
|
|
"image": Object {
|
|
"$type": "blob",
|
|
"mimeType": "image/jpeg",
|
|
"ref": Object {
|
|
"$link": "cids(9)",
|
|
},
|
|
"size": 12736,
|
|
},
|
|
},
|
|
],
|
|
},
|
|
"record": Object {
|
|
"record": Object {
|
|
"cid": "cids(10)",
|
|
"uri": "record(11)",
|
|
},
|
|
},
|
|
},
|
|
"text": "hi im carol",
|
|
},
|
|
},
|
|
},
|
|
],
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [],
|
|
"uri": "record(9)",
|
|
"value": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
"embed": Object {
|
|
"$type": "app.bsky.embed.record",
|
|
"record": Object {
|
|
"cid": "cids(8)",
|
|
"uri": "record(10)",
|
|
},
|
|
},
|
|
"facets": Array [
|
|
Object {
|
|
"features": Array [
|
|
Object {
|
|
"$type": "app.bsky.richtext.facet#mention",
|
|
"did": "user(0)",
|
|
},
|
|
],
|
|
"index": Object {
|
|
"byteEnd": 18,
|
|
"byteStart": 0,
|
|
},
|
|
},
|
|
],
|
|
"text": "@alice.bluesky.xyz is the best",
|
|
},
|
|
},
|
|
},
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [
|
|
Object {
|
|
"cid": "cids(6)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "did:example:labeler",
|
|
"uri": "record(8)",
|
|
"val": "test-label",
|
|
},
|
|
],
|
|
"likeCount": 2,
|
|
"record": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
"embed": Object {
|
|
"$type": "app.bsky.embed.record",
|
|
"record": Object {
|
|
"cid": "cids(7)",
|
|
"uri": "record(9)",
|
|
},
|
|
},
|
|
"text": "yoohoo label_me",
|
|
},
|
|
"replyCount": 0,
|
|
"repostCount": 0,
|
|
"uri": "record(8)",
|
|
"viewer": Object {
|
|
"like": "record(12)",
|
|
},
|
|
},
|
|
},
|
|
Object {
|
|
"post": Object {
|
|
"author": Object {
|
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(1)@jpeg",
|
|
"did": "user(0)",
|
|
"displayName": "ali",
|
|
"handle": "alice.test",
|
|
"labels": Array [
|
|
Object {
|
|
"cid": "cids(2)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(0)",
|
|
"uri": "record(3)",
|
|
"val": "self-label-a",
|
|
},
|
|
Object {
|
|
"cid": "cids(2)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(0)",
|
|
"uri": "record(3)",
|
|
"val": "self-label-b",
|
|
},
|
|
],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"followedBy": "record(2)",
|
|
"following": "record(1)",
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(3)",
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [],
|
|
"likeCount": 3,
|
|
"record": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000000Z",
|
|
"text": "again",
|
|
},
|
|
"replyCount": 2,
|
|
"repostCount": 1,
|
|
"uri": "record(4)",
|
|
"viewer": Object {
|
|
"like": "record(6)",
|
|
},
|
|
},
|
|
},
|
|
Object {
|
|
"post": Object {
|
|
"author": Object {
|
|
"avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(1)@jpeg",
|
|
"did": "user(0)",
|
|
"displayName": "ali",
|
|
"handle": "alice.test",
|
|
"labels": Array [
|
|
Object {
|
|
"cid": "cids(2)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(0)",
|
|
"uri": "record(3)",
|
|
"val": "self-label-a",
|
|
},
|
|
Object {
|
|
"cid": "cids(2)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(0)",
|
|
"uri": "record(3)",
|
|
"val": "self-label-b",
|
|
},
|
|
],
|
|
"viewer": Object {
|
|
"blockedBy": false,
|
|
"followedBy": "record(2)",
|
|
"following": "record(1)",
|
|
"muted": false,
|
|
},
|
|
},
|
|
"cid": "cids(11)",
|
|
"indexedAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Array [
|
|
Object {
|
|
"cid": "cids(11)",
|
|
"cts": "1970-01-01T00:00:00.000Z",
|
|
"neg": false,
|
|
"src": "user(0)",
|
|
"uri": "record(13)",
|
|
"val": "self-label",
|
|
},
|
|
],
|
|
"likeCount": 0,
|
|
"record": Object {
|
|
"$type": "app.bsky.feed.post",
|
|
"createdAt": "1970-01-01T00:00:00.000Z",
|
|
"labels": Object {
|
|
"$type": "com.atproto.label.defs#selfLabels",
|
|
"values": Array [
|
|
Object {
|
|
"val": "self-label",
|
|
},
|
|
],
|
|
},
|
|
"text": "hey there",
|
|
},
|
|
"replyCount": 0,
|
|
"repostCount": 0,
|
|
"uri": "record(13)",
|
|
"viewer": Object {},
|
|
},
|
|
},
|
|
]
|
|
`;
|