Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dholms authored and pfrazee committed Mar 12, 2024
1 parent 03aaa05 commit e82d4e1
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions packages/api/docs/moderation.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@ moderatePost(post, {
})
```

To gather the label definitions (`labelDefs`) see the *Labelers* section below.
To gather the label definitions (`labelDefs`) see the _Labelers_ section below.

## Labelers

Labelers are services that provide moderation labels. Your application will typically have 1+ top-level labelers set with the ability to do "takedowns" on content. This is controlled via this static function, though the default is to use Bluesky's moderation:

```typescript
BskyAgent.configure({
appLabelers: ['did:web:my-labeler.com']
appLabelers: ['did:web:my-labeler.com'],
})
```

Expand Down Expand Up @@ -144,7 +144,7 @@ The label value definition are custom labels which only apply to that labeler. Y
Here is how to do this:

```typescript
import {BskyAgent} from '@atproto/api'
import { BskyAgent } from '@atproto/api'

const agent = new BskyAgent()
// assume `agent` is a signed in session
Expand All @@ -154,7 +154,7 @@ const labelDefs = await agent.getLabelDefinitions(prefs)
moderatePost(post, {
userDid: agent.session.did,
prefs: prefs.moderationPrefs,
labelDefs
labelDefs,
})
```

Expand All @@ -169,7 +169,7 @@ import {
moderateNotification,
moderateFeedGen,
moderateUserList,
moderateLabeler
moderateLabeler,
} from '@atproto/api'
```

Expand Down Expand Up @@ -250,9 +250,11 @@ for (const inform of mod.ui('contentList').informs) {
Any Labeler is capable of receiving moderation reports. As a result, you need to specify which labeler should receive the report. You do this with the `Atproto-Proxy` header:

```typescript
agent.withProxy('atproto_labeler', 'did:web:my-labeler.com').createModerationReport({
reasonType: 'com.atproto.moderation.defs#reasonViolation',
reason: 'They were being such a jerk to me!',
subject: {did: 'did:web:bob.com'}
})
```
agent
.withProxy('atproto_labeler', 'did:web:my-labeler.com')
.createModerationReport({
reasonType: 'com.atproto.moderation.defs#reasonViolation',
reason: 'They were being such a jerk to me!',
subject: { did: 'did:web:bob.com' },
})
```

0 comments on commit e82d4e1

Please sign in to comment.