Type C# channel kinds#1639
Closed
samuelscheit wants to merge 3 commits intospacebarchat:masterfrom
Closed
Conversation
Member
Author
|
Code review: I reviewed the final diff for the C# channel type enum change and found no blocking issues. The DB model remains mapped to the existing integer column, the magic-number channel type checks are replaced with named enum values, and the added tests cover the changed behavior. Approved. |
Member
Author
|
Final PR handling report for the channel-type enum work: Changed files
Tests and checks run
Review outcomeReviewed the final diff after the CI formatting follow-up. The root cause is addressed by typing the DB channel kind once as Decision: approved; no another pass needed. |
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.
Summary
ChannelTypeenum for the DBChannel.Typemodel, aligned with Discord/Spacebar channel IDs.Root cause
The Admin API TODO came from raw integer channel-kind checks (
1for DM,2for guild voice). KeepingChannel.Typeas anintallowed more magic-number drift; typing the DB model at the source keeps all C# callers on the same channel-kind contract while preserving the existing integer database column.Validation
git diff --check origin/master...HEADdotnet test extra/admin-api/Tests/Spacebar.Models.Db.Tests/Spacebar.Models.Db.Tests.csproj --artifacts-path /tmp/spacebar-channel-type-test --nologo --verbosity minimaldotnet build extra/admin-api/Spacebar.AdminApi/Spacebar.AdminApi.csproj --artifacts-path /tmp/spacebar-channel-type-adminapi-build --nologo --verbosity minimaldotnet build extra/admin-api/Spacebar.Offload/Spacebar.Offload.csproj --artifacts-path /tmp/spacebar-channel-type-offload-build --nologo --verbosity minimaldotnet test extra/admin-api/SpacebarAdminAPI.slnx --artifacts-path /tmp/spacebar-channel-type-sln-test --nologo --verbosity quietAddresses the channel-type enum TODO from #1610.