Repository navigation
test(database): cover Timeout read as Mute in storage - #397
Merged
Merged
Conversation
Rows saved before the migration, or after a rollback, still hold Timeout. Also point the default warn thresholds description at moderation.mute-timeout.
|
Note The title starts with
|
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes: the single commit on top of #208, covering the new test and a one-clause wording fix to a locale string.
timeout-as-mute.test.ts: Adds two tests showing that aTimeoutstored on aGuildAutoModerationRulerow or aGuildWarnThresholdrow reads back asMute. The stubbed ORM matches howfetchAutoModerationRules(takes theorm) andfetchWarnThresholds(takes thedb) call it. It follows the style of the existingtests/legacyfiles.moderationDefaultWarnThresholdsstring: The description now says the default mute is a timeout whenmoderation.mute-timeoutis on or there is no muted role. That matchesmoderationMuteTimeoutdefaulting totrueinconstants.ts.en-US/settings.jsonand the generatedi18next.d.tsare updated identically.
claude-sonnet-5-5 | 𝕏
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Follow-up to #396, from its pullfrog review. Stacked on #208.
🔗 Linked issue
None.
❓ Type of change
📚 Description
projects/database/tests/settings/timeout-as-mute.test.ts. A rule or a warning threshold saved asTimeout, before the migration or after a rollback, now has a test that it reads asMute.moderation.default-warn-thresholdsnow says the default mute is a timeout whenmoderation.mute-timeoutis on or there is no muted role.moderation.mute-timeoutstays on for every server after the migration, including servers that only used the muted role. This is intended, and the Breaking Changes section of #396 now says so.

Confidence Score: 5/5
This PR appears safe to merge; no actionable issues were found.Reviews (1) · Last reviewed commit: "test(database): cover Timeout read as Mu..." · Reviewed by Greptile