point the remaining view moderation call sites at the sdk
The rest of the consumer surface - components, screens and the legacy `view` tree - takes its moderation types from `@bsky.app/sdk/moderation` and its `moderate*` calls from the `lib/moderation/subjects` seam. `DebugMod` constructs a `ModerationOpts` by hand for its scenario matrix, so its literal `userDid` is branded at the construction site.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import {forwardRef, useEffect, useImperativeHandle, useState} from 'react'
|
||||
import {Pressable, View} from 'react-native'
|
||||
import {type AppBskyActorDefs, type ModerationOpts} from '@atproto/api'
|
||||
import {type AppBskyActorDefs} from '@atproto/api'
|
||||
import {type ModerationOpts} from '@bsky.app/sdk/moderation'
|
||||
import {Trans} from '@lingui/react/macro'
|
||||
import {ReactRenderer} from '@tiptap/react'
|
||||
import {
|
||||
|
||||
@@ -90,14 +90,12 @@ export function ThreadgateBtn({
|
||||
* Preferences are still typed against the legacy client, so the stored
|
||||
* rules arrive unbranded. Wave B migrates `getPreferences`.
|
||||
*/
|
||||
allow: preferences?.postInteractionSettings
|
||||
.threadgateAllowRules as app.bsky.feed.threadgate.Main['allow'],
|
||||
allow: preferences?.postInteractionSettings.threadgateAllowRules,
|
||||
})
|
||||
const prefPostgate = createPostgateRecord({
|
||||
post: '',
|
||||
embeddingRules: (preferences?.postInteractionSettings
|
||||
?.postgateEmbeddingRules ||
|
||||
[]) as app.bsky.feed.postgate.Main['embeddingRules'],
|
||||
embeddingRules:
|
||||
preferences?.postInteractionSettings?.postgateEmbeddingRules || [],
|
||||
})
|
||||
|
||||
const isDirty = useMemo(() => {
|
||||
|
||||
Reference in New Issue
Block a user