From ce09d45238e925ada546d30a094d6e4b1cc72e67 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Sat, 22 Jun 2024 17:06:55 +0100 Subject: [PATCH 1/8] present detailed profile view for getSuggestions --- packages/bsky/src/api/app/bsky/actor/getSuggestions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/bsky/src/api/app/bsky/actor/getSuggestions.ts b/packages/bsky/src/api/app/bsky/actor/getSuggestions.ts index 34add3f7926..7c7a1fa15ff 100644 --- a/packages/bsky/src/api/app/bsky/actor/getSuggestions.ts +++ b/packages/bsky/src/api/app/bsky/actor/getSuggestions.ts @@ -124,7 +124,7 @@ const presentation = (input: { }) => { const { ctx, skeleton, hydration } = input const actors = mapDefined(skeleton.dids, (did) => - ctx.views.profile(did, hydration), + ctx.views.profileDetailed(did, hydration), ) return { actors, From f0b167d180716f8d6d2cd14316b50d29c2690140 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Sat, 22 Jun 2024 17:30:16 +0100 Subject: [PATCH 2/8] change lexicon to profileViewDetailed --- lexicons/app/bsky/actor/getSuggestions.json | 2 +- packages/api/src/client/lexicons.ts | 2 +- packages/api/src/client/types/app/bsky/actor/getSuggestions.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lexicons/app/bsky/actor/getSuggestions.json b/lexicons/app/bsky/actor/getSuggestions.json index 2004ae6f23e..bf961edfc54 100644 --- a/lexicons/app/bsky/actor/getSuggestions.json +++ b/lexicons/app/bsky/actor/getSuggestions.json @@ -28,7 +28,7 @@ "type": "array", "items": { "type": "ref", - "ref": "app.bsky.actor.defs#profileView" + "ref": "app.bsky.actor.defs#profileViewDetailed" } } } diff --git a/packages/api/src/client/lexicons.ts b/packages/api/src/client/lexicons.ts index eecbef0da6d..4be1f3c057b 100644 --- a/packages/api/src/client/lexicons.ts +++ b/packages/api/src/client/lexicons.ts @@ -4522,7 +4522,7 @@ export const schemaDict = { type: 'array', items: { type: 'ref', - ref: 'lex:app.bsky.actor.defs#profileView', + ref: 'lex:app.bsky.actor.defs#profileViewDetailed', }, }, }, diff --git a/packages/api/src/client/types/app/bsky/actor/getSuggestions.ts b/packages/api/src/client/types/app/bsky/actor/getSuggestions.ts index 3e974a29a05..3c2620fa9ba 100644 --- a/packages/api/src/client/types/app/bsky/actor/getSuggestions.ts +++ b/packages/api/src/client/types/app/bsky/actor/getSuggestions.ts @@ -17,7 +17,7 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string - actors: AppBskyActorDefs.ProfileView[] + actors: AppBskyActorDefs.ProfileViewDetailed[] [k: string]: unknown } From 8bf3150524fd8e479e76e7bf35d5a53cc3ae46e0 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Sat, 22 Jun 2024 17:39:28 +0100 Subject: [PATCH 3/8] finish running the codegen --- packages/bsky/src/lexicon/lexicons.ts | 2 +- .../bsky/src/lexicon/types/app/bsky/actor/getSuggestions.ts | 2 +- packages/ozone/src/lexicon/lexicons.ts | 2 +- .../ozone/src/lexicon/types/app/bsky/actor/getSuggestions.ts | 2 +- packages/pds/src/lexicon/lexicons.ts | 2 +- packages/pds/src/lexicon/types/app/bsky/actor/getSuggestions.ts | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/bsky/src/lexicon/lexicons.ts b/packages/bsky/src/lexicon/lexicons.ts index f771c7f96f4..e779b8080b3 100644 --- a/packages/bsky/src/lexicon/lexicons.ts +++ b/packages/bsky/src/lexicon/lexicons.ts @@ -4522,7 +4522,7 @@ export const schemaDict = { type: 'array', items: { type: 'ref', - ref: 'lex:app.bsky.actor.defs#profileView', + ref: 'lex:app.bsky.actor.defs#profileViewDetailed', }, }, }, diff --git a/packages/bsky/src/lexicon/types/app/bsky/actor/getSuggestions.ts b/packages/bsky/src/lexicon/types/app/bsky/actor/getSuggestions.ts index 33b89a18bfa..2afac914818 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/actor/getSuggestions.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/actor/getSuggestions.ts @@ -18,7 +18,7 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string - actors: AppBskyActorDefs.ProfileView[] + actors: AppBskyActorDefs.ProfileViewDetailed[] [k: string]: unknown } diff --git a/packages/ozone/src/lexicon/lexicons.ts b/packages/ozone/src/lexicon/lexicons.ts index eecbef0da6d..4be1f3c057b 100644 --- a/packages/ozone/src/lexicon/lexicons.ts +++ b/packages/ozone/src/lexicon/lexicons.ts @@ -4522,7 +4522,7 @@ export const schemaDict = { type: 'array', items: { type: 'ref', - ref: 'lex:app.bsky.actor.defs#profileView', + ref: 'lex:app.bsky.actor.defs#profileViewDetailed', }, }, }, diff --git a/packages/ozone/src/lexicon/types/app/bsky/actor/getSuggestions.ts b/packages/ozone/src/lexicon/types/app/bsky/actor/getSuggestions.ts index 33b89a18bfa..2afac914818 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/actor/getSuggestions.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/actor/getSuggestions.ts @@ -18,7 +18,7 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string - actors: AppBskyActorDefs.ProfileView[] + actors: AppBskyActorDefs.ProfileViewDetailed[] [k: string]: unknown } diff --git a/packages/pds/src/lexicon/lexicons.ts b/packages/pds/src/lexicon/lexicons.ts index eecbef0da6d..4be1f3c057b 100644 --- a/packages/pds/src/lexicon/lexicons.ts +++ b/packages/pds/src/lexicon/lexicons.ts @@ -4522,7 +4522,7 @@ export const schemaDict = { type: 'array', items: { type: 'ref', - ref: 'lex:app.bsky.actor.defs#profileView', + ref: 'lex:app.bsky.actor.defs#profileViewDetailed', }, }, }, diff --git a/packages/pds/src/lexicon/types/app/bsky/actor/getSuggestions.ts b/packages/pds/src/lexicon/types/app/bsky/actor/getSuggestions.ts index 33b89a18bfa..2afac914818 100644 --- a/packages/pds/src/lexicon/types/app/bsky/actor/getSuggestions.ts +++ b/packages/pds/src/lexicon/types/app/bsky/actor/getSuggestions.ts @@ -18,7 +18,7 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string - actors: AppBskyActorDefs.ProfileView[] + actors: AppBskyActorDefs.ProfileViewDetailed[] [k: string]: unknown } From 21609516afcbcda5f86566eb9053d0b8db3834b0 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Sat, 22 Jun 2024 17:57:30 +0100 Subject: [PATCH 4/8] update snapshot test for getSuggestions --- .../proxied/__snapshots__/views.test.ts.snap | 86 ++++++++++++++++++- 1 file changed, 84 insertions(+), 2 deletions(-) diff --git a/packages/pds/tests/proxied/__snapshots__/views.test.ts.snap b/packages/pds/tests/proxied/__snapshots__/views.test.ts.snap index b0f682cfc19..3e793971aec 100644 --- a/packages/pds/tests/proxied/__snapshots__/views.test.ts.snap +++ b/packages/pds/tests/proxied/__snapshots__/views.test.ts.snap @@ -169,32 +169,114 @@ exports[`proxies view requests actor.getSuggestions 1`] = ` Object { "actors": Array [ Object { + "associated": Object { + "feedgens": 0, + "labeler": false, + "lists": 0, + }, "avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(0)@jpeg", "description": "hi im bob label_me", "did": "user(0)", "displayName": "bobby", + "followersCount": 2, + "followsCount": 2, "handle": "bob.test", "indexedAt": "1970-01-01T00:00:00.000Z", "labels": Array [], + "postsCount": 3, "viewer": Object { "blockedBy": false, "followedBy": "record(0)", + "knownFollowers": Object { + "count": 1, + "followers": Array [ + Object { + "avatar": "https://bsky.public.url/img/avatar/plain/user(3)/cids(0)@jpeg", + "did": "user(2)", + "displayName": "ali", + "handle": "alice.test", + "labels": Array [ + Object { + "cid": "cids(1)", + "cts": "1970-01-01T00:00:00.000Z", + "src": "user(2)", + "uri": "record(3)", + "val": "self-label-a", + }, + Object { + "cid": "cids(1)", + "cts": "1970-01-01T00:00:00.000Z", + "src": "user(2)", + "uri": "record(3)", + "val": "self-label-b", + }, + ], + "viewer": Object { + "blockedBy": false, + "followedBy": "record(2)", + "following": "record(1)", + "muted": false, + }, + }, + ], + }, "muted": false, }, }, Object { - "did": "user(2)", + "associated": Object { + "feedgens": 0, + "labeler": false, + "lists": 0, + }, + "did": "user(4)", + "followersCount": 1, + "followsCount": 1, "handle": "dan.test", "labels": Array [ Object { "cts": "1970-01-01T00:00:00.000Z", "src": "did:example:labeler", - "uri": "user(2)", + "uri": "user(4)", "val": "repo-action-label", }, ], + "postsCount": 2, "viewer": Object { "blockedBy": false, + "knownFollowers": Object { + "count": 1, + "followers": Array [ + Object { + "avatar": "https://bsky.public.url/img/avatar/plain/user(3)/cids(0)@jpeg", + "did": "user(2)", + "displayName": "ali", + "handle": "alice.test", + "labels": Array [ + Object { + "cid": "cids(1)", + "cts": "1970-01-01T00:00:00.000Z", + "src": "user(2)", + "uri": "record(3)", + "val": "self-label-a", + }, + Object { + "cid": "cids(1)", + "cts": "1970-01-01T00:00:00.000Z", + "src": "user(2)", + "uri": "record(3)", + "val": "self-label-b", + }, + ], + "viewer": Object { + "blockedBy": false, + "followedBy": "record(2)", + "following": "record(1)", + "muted": false, + }, + }, + ], + }, "muted": false, }, }, From d9cdbee6445fdf879543508129667b32494b93e7 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Tue, 25 Jun 2024 11:36:01 +0100 Subject: [PATCH 5/8] Revert "change lexicon to profileViewDetailed" This reverts commit f0b167d180716f8d6d2cd14316b50d29c2690140. Revert "update snapshot test for getSuggestions" This reverts commit 21609516afcbcda5f86566eb9053d0b8db3834b0. Revert "finish running the codegen" This reverts commit 8bf3150524fd8e479e76e7bf35d5a53cc3ae46e0. --- lexicons/app/bsky/actor/getSuggestions.json | 2 +- packages/api/src/client/lexicons.ts | 2 +- .../types/app/bsky/actor/getSuggestions.ts | 2 +- packages/bsky/src/lexicon/lexicons.ts | 2 +- .../types/app/bsky/actor/getSuggestions.ts | 2 +- packages/ozone/src/lexicon/lexicons.ts | 2 +- .../types/app/bsky/actor/getSuggestions.ts | 2 +- packages/pds/src/lexicon/lexicons.ts | 2 +- .../types/app/bsky/actor/getSuggestions.ts | 2 +- .../proxied/__snapshots__/views.test.ts.snap | 86 +------------------ 10 files changed, 11 insertions(+), 93 deletions(-) diff --git a/lexicons/app/bsky/actor/getSuggestions.json b/lexicons/app/bsky/actor/getSuggestions.json index bf961edfc54..2004ae6f23e 100644 --- a/lexicons/app/bsky/actor/getSuggestions.json +++ b/lexicons/app/bsky/actor/getSuggestions.json @@ -28,7 +28,7 @@ "type": "array", "items": { "type": "ref", - "ref": "app.bsky.actor.defs#profileViewDetailed" + "ref": "app.bsky.actor.defs#profileView" } } } diff --git a/packages/api/src/client/lexicons.ts b/packages/api/src/client/lexicons.ts index 4be1f3c057b..eecbef0da6d 100644 --- a/packages/api/src/client/lexicons.ts +++ b/packages/api/src/client/lexicons.ts @@ -4522,7 +4522,7 @@ export const schemaDict = { type: 'array', items: { type: 'ref', - ref: 'lex:app.bsky.actor.defs#profileViewDetailed', + ref: 'lex:app.bsky.actor.defs#profileView', }, }, }, diff --git a/packages/api/src/client/types/app/bsky/actor/getSuggestions.ts b/packages/api/src/client/types/app/bsky/actor/getSuggestions.ts index 3c2620fa9ba..3e974a29a05 100644 --- a/packages/api/src/client/types/app/bsky/actor/getSuggestions.ts +++ b/packages/api/src/client/types/app/bsky/actor/getSuggestions.ts @@ -17,7 +17,7 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string - actors: AppBskyActorDefs.ProfileViewDetailed[] + actors: AppBskyActorDefs.ProfileView[] [k: string]: unknown } diff --git a/packages/bsky/src/lexicon/lexicons.ts b/packages/bsky/src/lexicon/lexicons.ts index e779b8080b3..f771c7f96f4 100644 --- a/packages/bsky/src/lexicon/lexicons.ts +++ b/packages/bsky/src/lexicon/lexicons.ts @@ -4522,7 +4522,7 @@ export const schemaDict = { type: 'array', items: { type: 'ref', - ref: 'lex:app.bsky.actor.defs#profileViewDetailed', + ref: 'lex:app.bsky.actor.defs#profileView', }, }, }, diff --git a/packages/bsky/src/lexicon/types/app/bsky/actor/getSuggestions.ts b/packages/bsky/src/lexicon/types/app/bsky/actor/getSuggestions.ts index 2afac914818..33b89a18bfa 100644 --- a/packages/bsky/src/lexicon/types/app/bsky/actor/getSuggestions.ts +++ b/packages/bsky/src/lexicon/types/app/bsky/actor/getSuggestions.ts @@ -18,7 +18,7 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string - actors: AppBskyActorDefs.ProfileViewDetailed[] + actors: AppBskyActorDefs.ProfileView[] [k: string]: unknown } diff --git a/packages/ozone/src/lexicon/lexicons.ts b/packages/ozone/src/lexicon/lexicons.ts index 4be1f3c057b..eecbef0da6d 100644 --- a/packages/ozone/src/lexicon/lexicons.ts +++ b/packages/ozone/src/lexicon/lexicons.ts @@ -4522,7 +4522,7 @@ export const schemaDict = { type: 'array', items: { type: 'ref', - ref: 'lex:app.bsky.actor.defs#profileViewDetailed', + ref: 'lex:app.bsky.actor.defs#profileView', }, }, }, diff --git a/packages/ozone/src/lexicon/types/app/bsky/actor/getSuggestions.ts b/packages/ozone/src/lexicon/types/app/bsky/actor/getSuggestions.ts index 2afac914818..33b89a18bfa 100644 --- a/packages/ozone/src/lexicon/types/app/bsky/actor/getSuggestions.ts +++ b/packages/ozone/src/lexicon/types/app/bsky/actor/getSuggestions.ts @@ -18,7 +18,7 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string - actors: AppBskyActorDefs.ProfileViewDetailed[] + actors: AppBskyActorDefs.ProfileView[] [k: string]: unknown } diff --git a/packages/pds/src/lexicon/lexicons.ts b/packages/pds/src/lexicon/lexicons.ts index 4be1f3c057b..eecbef0da6d 100644 --- a/packages/pds/src/lexicon/lexicons.ts +++ b/packages/pds/src/lexicon/lexicons.ts @@ -4522,7 +4522,7 @@ export const schemaDict = { type: 'array', items: { type: 'ref', - ref: 'lex:app.bsky.actor.defs#profileViewDetailed', + ref: 'lex:app.bsky.actor.defs#profileView', }, }, }, diff --git a/packages/pds/src/lexicon/types/app/bsky/actor/getSuggestions.ts b/packages/pds/src/lexicon/types/app/bsky/actor/getSuggestions.ts index 2afac914818..33b89a18bfa 100644 --- a/packages/pds/src/lexicon/types/app/bsky/actor/getSuggestions.ts +++ b/packages/pds/src/lexicon/types/app/bsky/actor/getSuggestions.ts @@ -18,7 +18,7 @@ export type InputSchema = undefined export interface OutputSchema { cursor?: string - actors: AppBskyActorDefs.ProfileViewDetailed[] + actors: AppBskyActorDefs.ProfileView[] [k: string]: unknown } diff --git a/packages/pds/tests/proxied/__snapshots__/views.test.ts.snap b/packages/pds/tests/proxied/__snapshots__/views.test.ts.snap index 3e793971aec..b0f682cfc19 100644 --- a/packages/pds/tests/proxied/__snapshots__/views.test.ts.snap +++ b/packages/pds/tests/proxied/__snapshots__/views.test.ts.snap @@ -169,114 +169,32 @@ exports[`proxies view requests actor.getSuggestions 1`] = ` Object { "actors": Array [ Object { - "associated": Object { - "feedgens": 0, - "labeler": false, - "lists": 0, - }, "avatar": "https://bsky.public.url/img/avatar/plain/user(1)/cids(0)@jpeg", "description": "hi im bob label_me", "did": "user(0)", "displayName": "bobby", - "followersCount": 2, - "followsCount": 2, "handle": "bob.test", "indexedAt": "1970-01-01T00:00:00.000Z", "labels": Array [], - "postsCount": 3, "viewer": Object { "blockedBy": false, "followedBy": "record(0)", - "knownFollowers": Object { - "count": 1, - "followers": Array [ - Object { - "avatar": "https://bsky.public.url/img/avatar/plain/user(3)/cids(0)@jpeg", - "did": "user(2)", - "displayName": "ali", - "handle": "alice.test", - "labels": Array [ - Object { - "cid": "cids(1)", - "cts": "1970-01-01T00:00:00.000Z", - "src": "user(2)", - "uri": "record(3)", - "val": "self-label-a", - }, - Object { - "cid": "cids(1)", - "cts": "1970-01-01T00:00:00.000Z", - "src": "user(2)", - "uri": "record(3)", - "val": "self-label-b", - }, - ], - "viewer": Object { - "blockedBy": false, - "followedBy": "record(2)", - "following": "record(1)", - "muted": false, - }, - }, - ], - }, "muted": false, }, }, Object { - "associated": Object { - "feedgens": 0, - "labeler": false, - "lists": 0, - }, - "did": "user(4)", - "followersCount": 1, - "followsCount": 1, + "did": "user(2)", "handle": "dan.test", "labels": Array [ Object { "cts": "1970-01-01T00:00:00.000Z", "src": "did:example:labeler", - "uri": "user(4)", + "uri": "user(2)", "val": "repo-action-label", }, ], - "postsCount": 2, "viewer": Object { "blockedBy": false, - "knownFollowers": Object { - "count": 1, - "followers": Array [ - Object { - "avatar": "https://bsky.public.url/img/avatar/plain/user(3)/cids(0)@jpeg", - "did": "user(2)", - "displayName": "ali", - "handle": "alice.test", - "labels": Array [ - Object { - "cid": "cids(1)", - "cts": "1970-01-01T00:00:00.000Z", - "src": "user(2)", - "uri": "record(3)", - "val": "self-label-a", - }, - Object { - "cid": "cids(1)", - "cts": "1970-01-01T00:00:00.000Z", - "src": "user(2)", - "uri": "record(3)", - "val": "self-label-b", - }, - ], - "viewer": Object { - "blockedBy": false, - "followedBy": "record(2)", - "following": "record(1)", - "muted": false, - }, - }, - ], - }, "muted": false, }, }, From 5a3b07ca9d22de7198c2f472f01540cfa632429f Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Tue, 25 Jun 2024 11:41:12 +0100 Subject: [PATCH 6/8] use basic profile + knownfollowers --- .../src/api/app/bsky/actor/getSuggestions.ts | 2 +- packages/bsky/src/views/index.ts | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/packages/bsky/src/api/app/bsky/actor/getSuggestions.ts b/packages/bsky/src/api/app/bsky/actor/getSuggestions.ts index 7c7a1fa15ff..d209a6f4cef 100644 --- a/packages/bsky/src/api/app/bsky/actor/getSuggestions.ts +++ b/packages/bsky/src/api/app/bsky/actor/getSuggestions.ts @@ -124,7 +124,7 @@ const presentation = (input: { }) => { const { ctx, skeleton, hydration } = input const actors = mapDefined(skeleton.dids, (did) => - ctx.views.profileDetailed(did, hydration), + ctx.views.profileKnownFollowers(did, hydration), ) return { actors, diff --git a/packages/bsky/src/views/index.ts b/packages/bsky/src/views/index.ts index 711c3a9f83e..3846a89b585 100644 --- a/packages/bsky/src/views/index.ts +++ b/packages/bsky/src/views/index.ts @@ -203,6 +203,29 @@ export class Views { } } + profileKnownFollowers( + did: string, + state: HydrationState, + ): ProfileView | undefined { + const actor = state.actors?.get(did) + if (!actor) return + const baseView = this.profile(did, state) + if (!baseView) return + const knownFollowersSkeleton = state.knownFollowers?.get(did) + const knownFollowers = knownFollowersSkeleton + ? this.knownFollowers(knownFollowersSkeleton, state) + : undefined + return { + ...baseView, + viewer: baseView.viewer + ? { + ...baseView.viewer, + knownFollowers, + } + : undefined, + } + } + profileViewer( did: string, state: HydrationState, From 231e8cb86054263c364d3c3017e4dcddd3184ced Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Tue, 25 Jun 2024 12:05:57 +0100 Subject: [PATCH 7/8] update snapshot test --- .../proxied/__snapshots__/views.test.ts.snap | 70 ++++++++++++++++++- 1 file changed, 68 insertions(+), 2 deletions(-) diff --git a/packages/pds/tests/proxied/__snapshots__/views.test.ts.snap b/packages/pds/tests/proxied/__snapshots__/views.test.ts.snap index b0f682cfc19..0f44c8c044c 100644 --- a/packages/pds/tests/proxied/__snapshots__/views.test.ts.snap +++ b/packages/pds/tests/proxied/__snapshots__/views.test.ts.snap @@ -179,22 +179,88 @@ Object { "viewer": Object { "blockedBy": false, "followedBy": "record(0)", + "knownFollowers": Object { + "count": 1, + "followers": Array [ + Object { + "avatar": "https://bsky.public.url/img/avatar/plain/user(3)/cids(0)@jpeg", + "did": "user(2)", + "displayName": "ali", + "handle": "alice.test", + "labels": Array [ + Object { + "cid": "cids(1)", + "cts": "1970-01-01T00:00:00.000Z", + "src": "user(2)", + "uri": "record(3)", + "val": "self-label-a", + }, + Object { + "cid": "cids(1)", + "cts": "1970-01-01T00:00:00.000Z", + "src": "user(2)", + "uri": "record(3)", + "val": "self-label-b", + }, + ], + "viewer": Object { + "blockedBy": false, + "followedBy": "record(2)", + "following": "record(1)", + "muted": false, + }, + }, + ], + }, "muted": false, }, }, Object { - "did": "user(2)", + "did": "user(4)", "handle": "dan.test", "labels": Array [ Object { "cts": "1970-01-01T00:00:00.000Z", "src": "did:example:labeler", - "uri": "user(2)", + "uri": "user(4)", "val": "repo-action-label", }, ], "viewer": Object { "blockedBy": false, + "knownFollowers": Object { + "count": 1, + "followers": Array [ + Object { + "avatar": "https://bsky.public.url/img/avatar/plain/user(3)/cids(0)@jpeg", + "did": "user(2)", + "displayName": "ali", + "handle": "alice.test", + "labels": Array [ + Object { + "cid": "cids(1)", + "cts": "1970-01-01T00:00:00.000Z", + "src": "user(2)", + "uri": "record(3)", + "val": "self-label-a", + }, + Object { + "cid": "cids(1)", + "cts": "1970-01-01T00:00:00.000Z", + "src": "user(2)", + "uri": "record(3)", + "val": "self-label-b", + }, + ], + "viewer": Object { + "blockedBy": false, + "followedBy": "record(2)", + "following": "record(1)", + "muted": false, + }, + }, + ], + }, "muted": false, }, }, From 29a89cf310393848360ee00a25467dd6312cbdc1 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Tue, 25 Jun 2024 14:15:23 +0100 Subject: [PATCH 8/8] add createdAt to snapshot --- packages/pds/tests/proxied/__snapshots__/views.test.ts.snap | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/pds/tests/proxied/__snapshots__/views.test.ts.snap b/packages/pds/tests/proxied/__snapshots__/views.test.ts.snap index 0f44c8c044c..8b061c4607d 100644 --- a/packages/pds/tests/proxied/__snapshots__/views.test.ts.snap +++ b/packages/pds/tests/proxied/__snapshots__/views.test.ts.snap @@ -184,6 +184,7 @@ Object { "followers": Array [ Object { "avatar": "https://bsky.public.url/img/avatar/plain/user(3)/cids(0)@jpeg", + "createdAt": "1970-01-01T00:00:00.000Z", "did": "user(2)", "displayName": "ali", "handle": "alice.test", @@ -233,6 +234,7 @@ Object { "followers": Array [ Object { "avatar": "https://bsky.public.url/img/avatar/plain/user(3)/cids(0)@jpeg", + "createdAt": "1970-01-01T00:00:00.000Z", "did": "user(2)", "displayName": "ali", "handle": "alice.test",