-
Notifications
You must be signed in to change notification settings - Fork 578
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
Update muted words handling, add attributes #2276
Merged
Merged
Changes from 18 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
429ea11
Sketch proposal for additional muted words attributes
estrattonbailey d1226ca
Rename ttl -> expiresAt
estrattonbailey c5ed433
Feedback
estrattonbailey 452bace
Codegen
estrattonbailey 8759cb6
Refactor muted words methods to integrate new attributes
estrattonbailey 83b7087
Add changeset
estrattonbailey 03d8a70
Use datetime format
estrattonbailey 07a1553
Simplify migration
estrattonbailey ca359ca
Fix tests
estrattonbailey a7eb5bb
Format
estrattonbailey bbb1246
Merge remote-tracking branch 'origin/main' into eric/mute-words-enhan…
estrattonbailey 8a98dda
Re-integrate tests
estrattonbailey 69d5f21
Let the lock cook
estrattonbailey e46566a
Fix comments
estrattonbailey 6c5ba0d
Integrate mute words enhancements (#2643)
estrattonbailey 90e8343
Remove fake timers
estrattonbailey 424df67
Update changeset
estrattonbailey 194a1fd
Prevent deleting value when updating
estrattonbailey df20225
Include missing test
estrattonbailey c3124bb
Add default
estrattonbailey ef736cc
Apply default 'all' value to existing mute words to satisfy Typescript
estrattonbailey e59c3d1
Fix types in tests
estrattonbailey 395c1ae
Merge remote-tracking branch 'origin/main' into eric/mute-words-enhan…
estrattonbailey 3c2c06b
Fix types on new tests
estrattonbailey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
'@atproto/ozone': patch | ||
'@atproto/bsky': patch | ||
'@atproto/api': patch | ||
'@atproto/pds': patch | ||
--- | ||
|
||
Updates muted words lexicons to include new attributes `id`, `actorTarget`, and `expiresAt`. Adds and updates methods in API SDK for better management of muted words. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC we have a "default" field that might be useful here to indicate what it does if nothing is specified
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah we do! So interesting thing though: this removes the
?
optionality of the propactorTarget
. Technically on first read, mute words aren't migrated, soactorTarget
for old mute words will always be undefined.In my latest commit, I opted to map over existing words and insert that default value if
actorTarget
is undefined.Cool with that? If not, I think the move would be to remove the default to keep the type optional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh. I dont recall why we wouldve done it that way, other than perhaps because we expected the default value to always get filled in.
I'm totally good w/what you did but up to you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that it's a little tighter like this so gonna roll with it 👍