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 match: MuteWordMatch to muted-word mod decision cause #2934

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

estrattonbailey
Copy link
Member

This PR adds a match: MuteWordMatch prop to the muted-word cause type. Previous logic was checking for truthy/falsy values, so the migration was pretty straightforward. This requires no change to the matching logic itself.

Matching logic now:

  • returns MuteWordMatch | null instead of a boolean
  • migrates some tests to toBeTruthy and toBeNull
  • adds the new prop to muted-word cause
  • updates a few tests to check for this new prop

Comment on lines 24 to 26
export type MuteWordMatch = {
word: AppBskyActorDefs.MutedWord
} | null
Copy link
Member Author

Choose a reason for hiding this comment

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

Leaving this open ended in case we wanted to add additional props to the match in the future.

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.

1 participant