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

Add setPostInteractionSettings and related prefs #3494

Conversation

estrattonbailey
Copy link
Member

@estrattonbailey estrattonbailey commented Feb 4, 2025

Introduces a new preferences object whereby the user can specify their preferred default threadgate/postgate rules. This data will be used to pre-fill their post interaction settings when creating new posts. It will not apply to previously existing posts.

agent.setPostInteractionSettings({
  threadgateAllowRules: AppBskyFeedThreadgate.Record['allow']
  postgateEmbeddingRules: AppBskyFeedPostgate.Record['embeddingRules']
})

I also added some clarifying descriptions to the lexicons so that they output to the types. The handling around these is a little different, and unclear. Main thing: threadgate['allow'] being set to undefined means "no rules specified, anyone can reply" and [] means "no allow rules were added by the user, no one can reply". This is some historical baggage that would require a larger refactor to handle, and so it's not handled here.

@estrattonbailey estrattonbailey marked this pull request as ready for review February 5, 2025 21:30
"refs": [
"app.bsky.feed.threadgate#mentionRule",
"app.bsky.feed.threadgate#followingRule",
"app.bsky.feed.threadgate#listRule"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to merge #3496 soon. You could include the new rule here before merging this.

@estrattonbailey estrattonbailey merged commit 87ed907 into main Feb 5, 2025
10 checks passed
@estrattonbailey estrattonbailey deleted the eric/app-1012-add-prefs-object-to-store-postgate-and-threadgate-rules branch February 5, 2025 23:43
@github-actions github-actions bot mentioned this pull request Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants