atproto/packages/bsky/tests/views/__snapshots__/notifications.test.ts.snap
rafael 638f5a8312
Fix avatar path resolution in dev-env (#3266)
* Fix avatar path resolution in dev-env

* changeset

* extract dev-env assets to dedicated folder

* add comment

* fix fmt
2024-12-19 11:25:41 -03:00

1655 lines
43 KiB
Plaintext

// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`notification views fetches notifications omitting mentions and replies for taken-down posts 1`] = `
Array [
Object {
"author": Object {
"associated": Object {
"chat": Object {
"allowIncoming": "none",
},
},
"did": "user(0)",
"handle": "dan.test",
"labels": Array [],
"viewer": Object {
"blockedBy": false,
"following": "record(1)",
"muted": false,
},
},
"cid": "cids(0)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": false,
"labels": Array [],
"reason": "repost",
"reasonSubject": "record(2)",
"record": Object {
"$type": "app.bsky.feed.repost",
"createdAt": "1970-01-01T00:00:00.000Z",
"subject": Object {
"cid": "cids(1)",
"uri": "record(2)",
},
},
"uri": "record(0)",
},
Object {
"author": Object {
"associated": Object {
"chat": Object {
"allowIncoming": "none",
},
},
"did": "user(0)",
"handle": "dan.test",
"labels": Array [],
"viewer": Object {
"blockedBy": false,
"following": "record(1)",
"muted": false,
},
},
"cid": "cids(2)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": false,
"labels": Array [],
"reason": "repost",
"reasonSubject": "record(4)",
"record": Object {
"$type": "app.bsky.feed.repost",
"createdAt": "1970-01-01T00:00:00.000Z",
"subject": Object {
"cid": "cids(3)",
"uri": "record(4)",
},
},
"uri": "record(3)",
},
Object {
"author": Object {
"associated": Object {
"chat": Object {
"allowIncoming": "none",
},
},
"did": "user(0)",
"handle": "dan.test",
"labels": Array [],
"viewer": Object {
"blockedBy": false,
"following": "record(1)",
"muted": false,
},
},
"cid": "cids(4)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": false,
"labels": Array [],
"reason": "like",
"reasonSubject": "record(4)",
"record": Object {
"$type": "app.bsky.feed.like",
"createdAt": "1970-01-01T00:00:00.000Z",
"subject": Object {
"cid": "cids(3)",
"uri": "record(4)",
},
},
"uri": "record(5)",
},
Object {
"author": Object {
"did": "user(1)",
"handle": "carol.test",
"labels": Array [],
"viewer": Object {
"blockedBy": false,
"followedBy": "record(6)",
"following": "record(7)",
"muted": false,
},
},
"cid": "cids(5)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": false,
"labels": Array [],
"reason": "follow",
"record": Object {
"$type": "app.bsky.graph.follow",
"createdAt": "1970-01-01T00:00:00.000Z",
"subject": "user(2)",
},
"uri": "record(6)",
},
Object {
"author": Object {
"did": "user(1)",
"handle": "carol.test",
"labels": Array [],
"viewer": Object {
"blockedBy": false,
"followedBy": "record(6)",
"following": "record(7)",
"muted": false,
},
},
"cid": "cids(6)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": false,
"labels": Array [],
"reason": "reply",
"reasonSubject": "record(2)",
"record": Object {
"$type": "app.bsky.feed.post",
"createdAt": "1970-01-01T00:00:00.000Z",
"reply": Object {
"parent": Object {
"cid": "cids(1)",
"uri": "record(2)",
},
"root": Object {
"cid": "cids(3)",
"uri": "record(4)",
},
},
"text": "indeed",
},
"uri": "record(8)",
},
Object {
"author": Object {
"did": "user(1)",
"handle": "carol.test",
"labels": Array [],
"viewer": Object {
"blockedBy": false,
"followedBy": "record(6)",
"following": "record(7)",
"muted": false,
},
},
"cid": "cids(7)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": false,
"labels": Array [],
"reason": "like",
"reasonSubject": "record(10)",
"record": Object {
"$type": "app.bsky.feed.like",
"createdAt": "1970-01-01T00:00:00.000Z",
"subject": Object {
"cid": "cids(8)",
"uri": "record(10)",
},
},
"uri": "record(9)",
},
Object {
"author": Object {
"did": "user(1)",
"handle": "carol.test",
"labels": Array [],
"viewer": Object {
"blockedBy": false,
"followedBy": "record(6)",
"following": "record(7)",
"muted": false,
},
},
"cid": "cids(9)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": false,
"labels": Array [],
"reason": "like",
"reasonSubject": "record(4)",
"record": Object {
"$type": "app.bsky.feed.like",
"createdAt": "1970-01-01T00:00:00.000Z",
"subject": Object {
"cid": "cids(3)",
"uri": "record(4)",
},
},
"uri": "record(11)",
},
Object {
"author": Object {
"avatar": "https://bsky.public.url/img/avatar/plain/user(4)/cids(11)@jpeg",
"createdAt": "1970-01-01T00:00:00.000Z",
"description": "hi im bob label_me",
"did": "user(3)",
"displayName": "bobby",
"handle": "bob.test",
"indexedAt": "1970-01-01T00:00:00.000Z",
"labels": Array [],
"viewer": Object {
"blockedBy": false,
"followedBy": "record(12)",
"following": "record(13)",
"muted": false,
},
},
"cid": "cids(10)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": false,
"labels": Array [],
"reason": "follow",
"record": Object {
"$type": "app.bsky.graph.follow",
"createdAt": "1970-01-01T00:00:00.000Z",
"subject": "user(2)",
},
"uri": "record(12)",
},
Object {
"author": Object {
"avatar": "https://bsky.public.url/img/avatar/plain/user(4)/cids(11)@jpeg",
"createdAt": "1970-01-01T00:00:00.000Z",
"description": "hi im bob label_me",
"did": "user(3)",
"displayName": "bobby",
"handle": "bob.test",
"indexedAt": "1970-01-01T00:00:00.000Z",
"labels": Array [],
"viewer": Object {
"blockedBy": false,
"followedBy": "record(12)",
"following": "record(13)",
"muted": false,
},
},
"cid": "cids(12)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": false,
"labels": Array [
Object {
"cid": "cids(12)",
"cts": "1970-01-01T00:00:00.000Z",
"src": "did:example:labeler",
"uri": "record(14)",
"val": "test-label",
},
Object {
"cid": "cids(12)",
"cts": "1970-01-01T00:00:00.000Z",
"src": "did:example:labeler",
"uri": "record(14)",
"val": "test-label-2",
},
],
"reason": "reply",
"reasonSubject": "record(4)",
"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": "../dev-env/assets/key-landscape-small.jpg",
"image": Object {
"$type": "blob",
"mimeType": "image/jpeg",
"ref": Object {
"$link": "cids(13)",
},
"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",
},
"uri": "record(14)",
},
Object {
"author": Object {
"avatar": "https://bsky.public.url/img/avatar/plain/user(4)/cids(11)@jpeg",
"createdAt": "1970-01-01T00:00:00.000Z",
"description": "hi im bob label_me",
"did": "user(3)",
"displayName": "bobby",
"handle": "bob.test",
"indexedAt": "1970-01-01T00:00:00.000Z",
"labels": Array [],
"viewer": Object {
"blockedBy": false,
"followedBy": "record(12)",
"following": "record(13)",
"muted": false,
},
},
"cid": "cids(14)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": false,
"labels": Array [],
"reason": "like",
"reasonSubject": "record(10)",
"record": Object {
"$type": "app.bsky.feed.like",
"createdAt": "1970-01-01T00:00:00.000Z",
"subject": Object {
"cid": "cids(8)",
"uri": "record(10)",
},
},
"uri": "record(15)",
},
Object {
"author": Object {
"avatar": "https://bsky.public.url/img/avatar/plain/user(4)/cids(11)@jpeg",
"createdAt": "1970-01-01T00:00:00.000Z",
"description": "hi im bob label_me",
"did": "user(3)",
"displayName": "bobby",
"handle": "bob.test",
"indexedAt": "1970-01-01T00:00:00.000Z",
"labels": Array [],
"viewer": Object {
"blockedBy": false,
"followedBy": "record(12)",
"following": "record(13)",
"muted": false,
},
},
"cid": "cids(15)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": false,
"labels": Array [],
"reason": "like",
"reasonSubject": "record(4)",
"record": Object {
"$type": "app.bsky.feed.like",
"createdAt": "1970-01-01T00:00:00.000Z",
"subject": Object {
"cid": "cids(3)",
"uri": "record(4)",
},
},
"uri": "record(16)",
},
]
`;
exports[`notification views fetches notifications with default priority 1`] = `
Object {
"cursor": "0000000000000__bafycid",
"notifications": Array [
Object {
"author": Object {
"avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(1)@jpeg",
"createdAt": "1970-01-01T00:00:00.000Z",
"description": "its me!",
"did": "user(0)",
"displayName": "ali",
"handle": "alice.test",
"indexedAt": "1970-01-01T00:00:00.000Z",
"labels": Array [
Object {
"cid": "cids(2)",
"cts": "1970-01-01T00:00:00.000Z",
"src": "user(0)",
"uri": "record(3)",
"val": "self-label-a",
},
Object {
"cid": "cids(2)",
"cts": "1970-01-01T00:00:00.000Z",
"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",
"isRead": true,
"labels": Array [],
"reason": "like",
"reasonSubject": "record(4)",
"record": Object {
"$type": "app.bsky.feed.like",
"createdAt": "1970-01-01T00:00:00.000000Z",
"subject": Object {
"cid": "cids(3)",
"uri": "record(4)",
},
},
"uri": "record(0)",
},
Object {
"author": Object {
"avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(1)@jpeg",
"createdAt": "1970-01-01T00:00:00.000Z",
"description": "its me!",
"did": "user(0)",
"displayName": "ali",
"handle": "alice.test",
"indexedAt": "1970-01-01T00:00:00.000Z",
"labels": Array [
Object {
"cid": "cids(2)",
"cts": "1970-01-01T00:00:00.000Z",
"src": "user(0)",
"uri": "record(3)",
"val": "self-label-a",
},
Object {
"cid": "cids(2)",
"cts": "1970-01-01T00:00:00.000Z",
"src": "user(0)",
"uri": "record(3)",
"val": "self-label-b",
},
],
"viewer": Object {
"blockedBy": false,
"followedBy": "record(2)",
"following": "record(1)",
"muted": false,
},
},
"cid": "cids(4)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": true,
"labels": Array [],
"reason": "follow",
"record": Object {
"$type": "app.bsky.graph.follow",
"createdAt": "1970-01-01T00:00:00.000Z",
"subject": "user(2)",
},
"uri": "record(2)",
},
],
"priority": true,
"seenAt": "1970-01-01T00:00:00.000Z",
}
`;
exports[`notification views fetches notifications with explicit priority 1`] = `
Object {
"cursor": "0000000000000__bafycid",
"notifications": Array [
Object {
"author": Object {
"avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(1)@jpeg",
"createdAt": "1970-01-01T00:00:00.000Z",
"description": "its me!",
"did": "user(0)",
"displayName": "ali",
"handle": "alice.test",
"indexedAt": "1970-01-01T00:00:00.000Z",
"labels": Array [
Object {
"cid": "cids(2)",
"cts": "1970-01-01T00:00:00.000Z",
"src": "user(0)",
"uri": "record(3)",
"val": "self-label-a",
},
Object {
"cid": "cids(2)",
"cts": "1970-01-01T00:00:00.000Z",
"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",
"isRead": false,
"labels": Array [],
"reason": "like",
"reasonSubject": "record(4)",
"record": Object {
"$type": "app.bsky.feed.like",
"createdAt": "1970-01-01T00:00:00.000000Z",
"subject": Object {
"cid": "cids(3)",
"uri": "record(4)",
},
},
"uri": "record(0)",
},
Object {
"author": Object {
"avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(1)@jpeg",
"createdAt": "1970-01-01T00:00:00.000Z",
"description": "its me!",
"did": "user(0)",
"displayName": "ali",
"handle": "alice.test",
"indexedAt": "1970-01-01T00:00:00.000Z",
"labels": Array [
Object {
"cid": "cids(2)",
"cts": "1970-01-01T00:00:00.000Z",
"src": "user(0)",
"uri": "record(3)",
"val": "self-label-a",
},
Object {
"cid": "cids(2)",
"cts": "1970-01-01T00:00:00.000Z",
"src": "user(0)",
"uri": "record(3)",
"val": "self-label-b",
},
],
"viewer": Object {
"blockedBy": false,
"followedBy": "record(2)",
"following": "record(1)",
"muted": false,
},
},
"cid": "cids(4)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": true,
"labels": Array [],
"reason": "follow",
"record": Object {
"$type": "app.bsky.graph.follow",
"createdAt": "1970-01-01T00:00:00.000Z",
"subject": "user(2)",
},
"uri": "record(2)",
},
],
"priority": true,
"seenAt": "1970-01-01T00:00:00.000Z",
}
`;
exports[`notification views fetches notifications with explicit priority 2`] = `
Object {
"cursor": "0000000000000__bafycid",
"notifications": Array [
Object {
"author": Object {
"avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(1)@jpeg",
"createdAt": "1970-01-01T00:00:00.000Z",
"description": "hi im bob label_me",
"did": "user(0)",
"displayName": "bobby",
"handle": "bob.test",
"indexedAt": "1970-01-01T00:00:00.000Z",
"labels": Array [],
"viewer": Object {
"blockedBy": false,
"followedBy": "record(1)",
"muted": false,
},
},
"cid": "cids(0)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": false,
"labels": Array [],
"reason": "like",
"reasonSubject": "record(2)",
"record": Object {
"$type": "app.bsky.feed.like",
"createdAt": "1970-01-01T00:00:00.000+00:00",
"subject": Object {
"cid": "cids(2)",
"uri": "record(2)",
},
},
"uri": "record(0)",
},
Object {
"author": Object {
"avatar": "https://bsky.public.url/img/avatar/plain/user(3)/cids(1)@jpeg",
"createdAt": "1970-01-01T00:00:00.000Z",
"description": "its me!",
"did": "user(2)",
"displayName": "ali",
"handle": "alice.test",
"indexedAt": "1970-01-01T00:00:00.000Z",
"labels": Array [
Object {
"cid": "cids(4)",
"cts": "1970-01-01T00:00:00.000Z",
"src": "user(2)",
"uri": "record(6)",
"val": "self-label-a",
},
Object {
"cid": "cids(4)",
"cts": "1970-01-01T00:00:00.000Z",
"src": "user(2)",
"uri": "record(6)",
"val": "self-label-b",
},
],
"viewer": Object {
"blockedBy": false,
"followedBy": "record(5)",
"following": "record(4)",
"muted": false,
},
},
"cid": "cids(3)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": true,
"labels": Array [],
"reason": "like",
"reasonSubject": "record(2)",
"record": Object {
"$type": "app.bsky.feed.like",
"createdAt": "1970-01-01T00:00:00.000000Z",
"subject": Object {
"cid": "cids(2)",
"uri": "record(2)",
},
},
"uri": "record(3)",
},
Object {
"author": Object {
"associated": Object {
"chat": Object {
"allowIncoming": "none",
},
},
"did": "user(4)",
"handle": "dan.test",
"labels": Array [],
"viewer": Object {
"blockedBy": false,
"muted": false,
},
},
"cid": "cids(5)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": true,
"labels": Array [],
"reason": "quote",
"reasonSubject": "record(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(2)",
"uri": "record(2)",
},
},
"facets": Array [
Object {
"features": Array [
Object {
"$type": "app.bsky.richtext.facet#mention",
"did": "user(2)",
},
],
"index": Object {
"byteEnd": 18,
"byteStart": 0,
},
},
],
"text": "@alice.bluesky.xyz is the best",
},
"uri": "record(7)",
},
Object {
"author": Object {
"avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(1)@jpeg",
"createdAt": "1970-01-01T00:00:00.000Z",
"description": "hi im bob label_me",
"did": "user(0)",
"displayName": "bobby",
"handle": "bob.test",
"indexedAt": "1970-01-01T00:00:00.000Z",
"labels": Array [],
"viewer": Object {
"blockedBy": false,
"followedBy": "record(1)",
"muted": false,
},
},
"cid": "cids(6)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": true,
"labels": Array [],
"reason": "follow",
"record": Object {
"$type": "app.bsky.graph.follow",
"createdAt": "1970-01-01T00:00:00.000000Z",
"subject": "user(5)",
},
"uri": "record(1)",
},
Object {
"author": Object {
"avatar": "https://bsky.public.url/img/avatar/plain/user(3)/cids(1)@jpeg",
"createdAt": "1970-01-01T00:00:00.000Z",
"description": "its me!",
"did": "user(2)",
"displayName": "ali",
"handle": "alice.test",
"indexedAt": "1970-01-01T00:00:00.000Z",
"labels": Array [
Object {
"cid": "cids(4)",
"cts": "1970-01-01T00:00:00.000Z",
"src": "user(2)",
"uri": "record(6)",
"val": "self-label-a",
},
Object {
"cid": "cids(4)",
"cts": "1970-01-01T00:00:00.000Z",
"src": "user(2)",
"uri": "record(6)",
"val": "self-label-b",
},
],
"viewer": Object {
"blockedBy": false,
"followedBy": "record(5)",
"following": "record(4)",
"muted": false,
},
},
"cid": "cids(7)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": true,
"labels": Array [],
"reason": "follow",
"record": Object {
"$type": "app.bsky.graph.follow",
"createdAt": "1970-01-01T00:00:00.000Z",
"subject": "user(5)",
},
"uri": "record(5)",
},
],
"priority": false,
"seenAt": "1970-01-01T00:00:00.000Z",
}
`;
exports[`notification views fetches notifications without a last-seen 1`] = `
Array [
Object {
"author": Object {
"associated": Object {
"chat": Object {
"allowIncoming": "none",
},
},
"did": "user(0)",
"handle": "dan.test",
"labels": Array [],
"viewer": Object {
"blockedBy": false,
"following": "record(1)",
"muted": false,
},
},
"cid": "cids(0)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": true,
"labels": Array [],
"reason": "repost",
"reasonSubject": "record(2)",
"record": Object {
"$type": "app.bsky.feed.repost",
"createdAt": "1970-01-01T00:00:00.000Z",
"subject": Object {
"cid": "cids(1)",
"uri": "record(2)",
},
},
"uri": "record(0)",
},
Object {
"author": Object {
"associated": Object {
"chat": Object {
"allowIncoming": "none",
},
},
"did": "user(0)",
"handle": "dan.test",
"labels": Array [],
"viewer": Object {
"blockedBy": false,
"following": "record(1)",
"muted": false,
},
},
"cid": "cids(2)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": true,
"labels": Array [],
"reason": "repost",
"reasonSubject": "record(4)",
"record": Object {
"$type": "app.bsky.feed.repost",
"createdAt": "1970-01-01T00:00:00.000Z",
"subject": Object {
"cid": "cids(3)",
"uri": "record(4)",
},
},
"uri": "record(3)",
},
Object {
"author": Object {
"associated": Object {
"chat": Object {
"allowIncoming": "none",
},
},
"did": "user(0)",
"handle": "dan.test",
"labels": Array [],
"viewer": Object {
"blockedBy": false,
"following": "record(1)",
"muted": false,
},
},
"cid": "cids(4)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": true,
"labels": Array [],
"reason": "mention",
"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(5)",
"uri": "record(6)",
},
},
"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",
},
"uri": "record(5)",
},
Object {
"author": Object {
"associated": Object {
"chat": Object {
"allowIncoming": "none",
},
},
"did": "user(0)",
"handle": "dan.test",
"labels": Array [],
"viewer": Object {
"blockedBy": false,
"following": "record(1)",
"muted": false,
},
},
"cid": "cids(6)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": true,
"labels": Array [],
"reason": "like",
"reasonSubject": "record(4)",
"record": Object {
"$type": "app.bsky.feed.like",
"createdAt": "1970-01-01T00:00:00.000Z",
"subject": Object {
"cid": "cids(3)",
"uri": "record(4)",
},
},
"uri": "record(7)",
},
Object {
"author": Object {
"did": "user(2)",
"handle": "carol.test",
"labels": Array [],
"viewer": Object {
"blockedBy": false,
"followedBy": "record(8)",
"following": "record(9)",
"muted": false,
},
},
"cid": "cids(7)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": true,
"labels": Array [],
"reason": "follow",
"record": Object {
"$type": "app.bsky.graph.follow",
"createdAt": "1970-01-01T00:00:00.000Z",
"subject": "user(1)",
},
"uri": "record(8)",
},
Object {
"author": Object {
"did": "user(2)",
"handle": "carol.test",
"labels": Array [],
"viewer": Object {
"blockedBy": false,
"followedBy": "record(8)",
"following": "record(9)",
"muted": false,
},
},
"cid": "cids(8)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": false,
"labels": Array [],
"reason": "reply",
"reasonSubject": "record(2)",
"record": Object {
"$type": "app.bsky.feed.post",
"createdAt": "1970-01-01T00:00:00.000Z",
"reply": Object {
"parent": Object {
"cid": "cids(1)",
"uri": "record(2)",
},
"root": Object {
"cid": "cids(3)",
"uri": "record(4)",
},
},
"text": "indeed",
},
"uri": "record(10)",
},
Object {
"author": Object {
"did": "user(2)",
"handle": "carol.test",
"labels": Array [],
"viewer": Object {
"blockedBy": false,
"followedBy": "record(8)",
"following": "record(9)",
"muted": false,
},
},
"cid": "cids(9)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": true,
"labels": Array [],
"reason": "reply",
"reasonSubject": "record(4)",
"record": Object {
"$type": "app.bsky.feed.post",
"createdAt": "1970-01-01T00:00:00.000Z",
"reply": Object {
"parent": Object {
"cid": "cids(3)",
"uri": "record(4)",
},
"root": Object {
"cid": "cids(3)",
"uri": "record(4)",
},
},
"text": "of course",
},
"uri": "record(11)",
},
Object {
"author": Object {
"did": "user(2)",
"handle": "carol.test",
"labels": Array [],
"viewer": Object {
"blockedBy": false,
"followedBy": "record(8)",
"following": "record(9)",
"muted": false,
},
},
"cid": "cids(10)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": true,
"labels": Array [],
"reason": "like",
"reasonSubject": "record(13)",
"record": Object {
"$type": "app.bsky.feed.like",
"createdAt": "1970-01-01T00:00:00.000Z",
"subject": Object {
"cid": "cids(11)",
"uri": "record(13)",
},
},
"uri": "record(12)",
},
Object {
"author": Object {
"did": "user(2)",
"handle": "carol.test",
"labels": Array [],
"viewer": Object {
"blockedBy": false,
"followedBy": "record(8)",
"following": "record(9)",
"muted": false,
},
},
"cid": "cids(12)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": true,
"labels": Array [],
"reason": "like",
"reasonSubject": "record(4)",
"record": Object {
"$type": "app.bsky.feed.like",
"createdAt": "1970-01-01T00:00:00.000Z",
"subject": Object {
"cid": "cids(3)",
"uri": "record(4)",
},
},
"uri": "record(14)",
},
Object {
"author": Object {
"avatar": "https://bsky.public.url/img/avatar/plain/user(4)/cids(14)@jpeg",
"createdAt": "1970-01-01T00:00:00.000Z",
"description": "hi im bob label_me",
"did": "user(3)",
"displayName": "bobby",
"handle": "bob.test",
"indexedAt": "1970-01-01T00:00:00.000Z",
"labels": Array [],
"viewer": Object {
"blockedBy": false,
"followedBy": "record(15)",
"following": "record(16)",
"muted": false,
},
},
"cid": "cids(13)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": true,
"labels": Array [],
"reason": "follow",
"record": Object {
"$type": "app.bsky.graph.follow",
"createdAt": "1970-01-01T00:00:00.000Z",
"subject": "user(1)",
},
"uri": "record(15)",
},
Object {
"author": Object {
"avatar": "https://bsky.public.url/img/avatar/plain/user(4)/cids(14)@jpeg",
"createdAt": "1970-01-01T00:00:00.000Z",
"description": "hi im bob label_me",
"did": "user(3)",
"displayName": "bobby",
"handle": "bob.test",
"indexedAt": "1970-01-01T00:00:00.000Z",
"labels": Array [],
"viewer": Object {
"blockedBy": false,
"followedBy": "record(15)",
"following": "record(16)",
"muted": false,
},
},
"cid": "cids(15)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": true,
"labels": Array [
Object {
"cid": "cids(15)",
"cts": "1970-01-01T00:00:00.000Z",
"src": "did:example:labeler",
"uri": "record(17)",
"val": "test-label",
},
Object {
"cid": "cids(15)",
"cts": "1970-01-01T00:00:00.000Z",
"src": "did:example:labeler",
"uri": "record(17)",
"val": "test-label-2",
},
],
"reason": "reply",
"reasonSubject": "record(4)",
"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": "../dev-env/assets/key-landscape-small.jpg",
"image": Object {
"$type": "blob",
"mimeType": "image/jpeg",
"ref": Object {
"$link": "cids(16)",
},
"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",
},
"uri": "record(17)",
},
Object {
"author": Object {
"avatar": "https://bsky.public.url/img/avatar/plain/user(4)/cids(14)@jpeg",
"createdAt": "1970-01-01T00:00:00.000Z",
"description": "hi im bob label_me",
"did": "user(3)",
"displayName": "bobby",
"handle": "bob.test",
"indexedAt": "1970-01-01T00:00:00.000Z",
"labels": Array [],
"viewer": Object {
"blockedBy": false,
"followedBy": "record(15)",
"following": "record(16)",
"muted": false,
},
},
"cid": "cids(17)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": true,
"labels": Array [],
"reason": "like",
"reasonSubject": "record(13)",
"record": Object {
"$type": "app.bsky.feed.like",
"createdAt": "1970-01-01T00:00:00.000Z",
"subject": Object {
"cid": "cids(11)",
"uri": "record(13)",
},
},
"uri": "record(18)",
},
Object {
"author": Object {
"avatar": "https://bsky.public.url/img/avatar/plain/user(4)/cids(14)@jpeg",
"createdAt": "1970-01-01T00:00:00.000Z",
"description": "hi im bob label_me",
"did": "user(3)",
"displayName": "bobby",
"handle": "bob.test",
"indexedAt": "1970-01-01T00:00:00.000Z",
"labels": Array [],
"viewer": Object {
"blockedBy": false,
"followedBy": "record(15)",
"following": "record(16)",
"muted": false,
},
},
"cid": "cids(18)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": true,
"labels": Array [],
"reason": "like",
"reasonSubject": "record(4)",
"record": Object {
"$type": "app.bsky.feed.like",
"createdAt": "1970-01-01T00:00:00.000Z",
"subject": Object {
"cid": "cids(3)",
"uri": "record(4)",
},
},
"uri": "record(19)",
},
]
`;
exports[`notification views filters notifications by multiple reasons 1`] = `
Object {
"notifications": Array [
Object {
"author": Object {
"did": "user(0)",
"handle": "carol.test",
"labels": Array [],
"viewer": Object {
"blockedBy": false,
"followedBy": "record(2)",
"following": "record(1)",
"muted": false,
},
},
"cid": "cids(0)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": false,
"labels": Array [],
"reason": "reply",
"reasonSubject": "record(3)",
"record": Object {
"$type": "app.bsky.feed.post",
"createdAt": "1970-01-01T00:00:00.000Z",
"reply": Object {
"parent": Object {
"cid": "cids(2)",
"uri": "record(3)",
},
"root": Object {
"cid": "cids(1)",
"uri": "record(4)",
},
},
"text": "indeed",
},
"uri": "record(0)",
},
Object {
"author": Object {
"did": "user(0)",
"handle": "carol.test",
"labels": Array [],
"viewer": Object {
"blockedBy": false,
"followedBy": "record(2)",
"following": "record(1)",
"muted": false,
},
},
"cid": "cids(3)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": false,
"labels": Array [],
"reason": "reply",
"reasonSubject": "record(4)",
"record": Object {
"$type": "app.bsky.feed.post",
"createdAt": "1970-01-01T00:00:00.000Z",
"reply": Object {
"parent": Object {
"cid": "cids(1)",
"uri": "record(4)",
},
"root": Object {
"cid": "cids(1)",
"uri": "record(4)",
},
},
"text": "of course",
},
"uri": "record(5)",
},
Object {
"author": Object {
"avatar": "https://bsky.public.url/img/avatar/plain/user(2)/cids(5)@jpeg",
"createdAt": "1970-01-01T00:00:00.000Z",
"description": "hi im bob label_me",
"did": "user(1)",
"displayName": "bobby",
"handle": "bob.test",
"indexedAt": "1970-01-01T00:00:00.000Z",
"labels": Array [],
"viewer": Object {
"blockedBy": false,
"followedBy": "record(8)",
"following": "record(7)",
"muted": false,
},
},
"cid": "cids(4)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": false,
"labels": Array [
Object {
"cid": "cids(4)",
"cts": "1970-01-01T00:00:00.000Z",
"src": "did:example:labeler",
"uri": "record(6)",
"val": "test-label",
},
Object {
"cid": "cids(4)",
"cts": "1970-01-01T00:00:00.000Z",
"src": "did:example:labeler",
"uri": "record(6)",
"val": "test-label-2",
},
],
"reason": "reply",
"reasonSubject": "record(4)",
"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": "../dev-env/assets/key-landscape-small.jpg",
"image": Object {
"$type": "blob",
"mimeType": "image/jpeg",
"ref": Object {
"$link": "cids(6)",
},
"size": 4114,
},
},
],
},
"reply": Object {
"parent": Object {
"cid": "cids(1)",
"uri": "record(4)",
},
"root": Object {
"cid": "cids(1)",
"uri": "record(4)",
},
},
"text": "hear that label_me label_me_2",
},
"uri": "record(6)",
},
Object {
"author": Object {
"associated": Object {
"chat": Object {
"allowIncoming": "none",
},
},
"did": "user(3)",
"handle": "dan.test",
"labels": Array [],
"viewer": Object {
"blockedBy": false,
"following": "record(10)",
"muted": false,
},
},
"cid": "cids(7)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": false,
"labels": Array [],
"reason": "mention",
"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(8)",
"uri": "record(11)",
},
},
"facets": Array [
Object {
"features": Array [
Object {
"$type": "app.bsky.richtext.facet#mention",
"did": "user(4)",
},
],
"index": Object {
"byteEnd": 18,
"byteStart": 0,
},
},
],
"text": "@alice.bluesky.xyz is the best",
},
"uri": "record(9)",
},
],
"priority": false,
"seenAt": "1970-01-01T00:00:00.000Z",
}
`;
exports[`notification views filters notifications by reason 1`] = `
Object {
"notifications": Array [
Object {
"author": Object {
"associated": Object {
"chat": Object {
"allowIncoming": "none",
},
},
"did": "user(0)",
"handle": "dan.test",
"labels": Array [],
"viewer": Object {
"blockedBy": false,
"following": "record(1)",
"muted": false,
},
},
"cid": "cids(0)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": false,
"labels": Array [],
"reason": "mention",
"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(2)",
},
},
"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",
},
"uri": "record(0)",
},
],
"priority": false,
"seenAt": "1970-01-01T00:00:00.000Z",
}
`;
exports[`notification views generates notifications for quotes 1`] = `
Array [
Object {
"author": Object {
"did": "user(0)",
"handle": "carol.test",
"labels": Array [],
"viewer": Object {
"blockedBy": false,
"muted": false,
},
},
"cid": "cids(0)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": false,
"labels": Array [],
"reason": "repost",
"reasonSubject": "record(1)",
"record": Object {
"$type": "app.bsky.feed.repost",
"createdAt": "1970-01-01T00:00:00.000Z",
"subject": Object {
"cid": "cids(1)",
"uri": "record(1)",
},
},
"uri": "record(0)",
},
Object {
"author": Object {
"avatar": "https://bsky.public.url/img/avatar/plain/user(2)/cids(3)@jpeg",
"createdAt": "1970-01-01T00:00:00.000Z",
"description": "its me!",
"did": "user(1)",
"displayName": "ali",
"handle": "alice.test",
"indexedAt": "1970-01-01T00:00:00.000Z",
"labels": Array [
Object {
"cid": "cids(4)",
"cts": "1970-01-01T00:00:00.000Z",
"src": "user(1)",
"uri": "record(3)",
"val": "self-label-a",
},
Object {
"cid": "cids(4)",
"cts": "1970-01-01T00:00:00.000Z",
"src": "user(1)",
"uri": "record(3)",
"val": "self-label-b",
},
],
"viewer": Object {
"blockedBy": false,
"followedBy": "record(2)",
"muted": false,
},
},
"cid": "cids(2)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": true,
"labels": Array [],
"reason": "follow",
"record": Object {
"$type": "app.bsky.graph.follow",
"createdAt": "1970-01-01T00:00:00.000Z",
"subject": "user(3)",
},
"uri": "record(2)",
},
Object {
"author": Object {
"avatar": "https://bsky.public.url/img/avatar/plain/user(2)/cids(3)@jpeg",
"createdAt": "1970-01-01T00:00:00.000Z",
"description": "its me!",
"did": "user(1)",
"displayName": "ali",
"handle": "alice.test",
"indexedAt": "1970-01-01T00:00:00.000Z",
"labels": Array [
Object {
"cid": "cids(4)",
"cts": "1970-01-01T00:00:00.000Z",
"src": "user(1)",
"uri": "record(3)",
"val": "self-label-a",
},
Object {
"cid": "cids(4)",
"cts": "1970-01-01T00:00:00.000Z",
"src": "user(1)",
"uri": "record(3)",
"val": "self-label-b",
},
],
"viewer": Object {
"blockedBy": false,
"followedBy": "record(2)",
"muted": false,
},
},
"cid": "cids(5)",
"indexedAt": "1970-01-01T00:00:00.000Z",
"isRead": true,
"labels": Array [
Object {
"cid": "cids(5)",
"cts": "1970-01-01T00:00:00.000Z",
"src": "did:example:labeler",
"uri": "record(4)",
"val": "test-label",
},
],
"reason": "quote",
"reasonSubject": "record(1)",
"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)",
},
},
"text": "yoohoo label_me",
},
"uri": "record(4)",
},
]
`;