Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Appview: ensure takedowns on modlist authors always apply #3192

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
appview: test takedown on modlist author, application of list
  • Loading branch information
devinivy committed Dec 6, 2024
commit 0d1a968c73fe403cc425e3f98a5f07b70a637594
29 changes: 29 additions & 0 deletions packages/bsky/tests/views/labels-takedown.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ describe('bsky takedown labels', () => {
sc.getHeaders(sc.dids.carol),
)
carolListRef = await sc.createList(sc.dids.carol, 'carol list', 'mod')
// alice blocks dan via carol's list, and carol is takendown
await sc.addToList(sc.dids.carol, sc.dids.dan, carolListRef)
rafaelbsky marked this conversation as resolved.
Show resolved Hide resolved
await pdsAgent.app.bsky.graph.listblock.create(
{ repo: sc.dids.alice },
{
subject: carolListRef.uriStr,
createdAt: new Date().toISOString(),
},
sc.getHeaders(sc.dids.alice),
)
aliceGenRef = await sc.createFeedGen(
sc.dids.alice,
'did:web:example.com',
Expand Down Expand Up @@ -190,6 +200,25 @@ describe('bsky takedown labels', () => {
expect(profile.viewer?.blockingByList).toBeUndefined()
})

it('author takedown halts application of mod lists', async () => {
const { data: profile } = await agent.app.bsky.actor.getProfile(
{
actor: sc.dids.dan, // blocked via carol's list, and carol is takendown
},
{
headers: await network.serviceHeaders(
sc.dids.alice,
ids.AppBskyActorGetProfile,
),
},
)
expect(profile.did).toBe(sc.dids.dan)
expect(profile.viewer).not.toBeUndefined()
expect(profile.viewer?.blockedBy).toBe(false)
expect(profile.viewer?.blocking).toBeUndefined()
expect(profile.viewer?.blockingByList).toBeUndefined()
})

it('takesdown feed generators', async () => {
const res = await agent.api.app.bsky.feed.getFeedGenerators({
feeds: [aliceGenRef.uriStr, bobGenRef.uriStr, carolGenRef.uriStr],
Expand Down
Loading