mirror of
https://github.com/RedWizardsLab/EchoHub.git
synced 2026-09-04 00:26:07 +02:00
[PR #13] [MERGED] feat: extract channel management to IChannelService and implement CRU… #15
Reference in New Issue
Block a user
📋 Pull Request Information
Original PR: https://github.com/RedWizardsLab/EchoHub/pull/13
Author: @HueByte
Created: 2/21/2026
Status: ✅ Merged
Merged: 2/21/2026
Merged by: @HueByte
Base:
dev← Head:dev_channel_logic_update📝 Commits (4)
0d959e3feat: extract channel management to IChannelService and implement CRUD operations2cd3bbbchore: remove submodule NuGet config from CI workflows4930aeechore: update CI workflows to temporarily remove Terminal.Gui submodule's nuget.config to fix restore issuesdcb8bbcfix: exclude Terminal.Gui from formatting checks in CI workflow📊 Changes
16 files changed (+427 additions, -222 deletions)
View changed files
📝
.github/workflows/ci.yml(+10 -5)📝
.github/workflows/docs.yml(+5 -4)📝
.github/workflows/release.yml(+12 -12)📝
docs/changelog/v0.2.5.md(+15 -2)📝
src/EchoHub.Client/UI/MainWindow.cs(+1 -1)➕
src/EchoHub.Core/Contracts/IChannelService.cs(+22 -0)📝
src/EchoHub.Core/Contracts/IChatService.cs(+1 -5)📝
src/EchoHub.Core/DTOs/CommonDtos.cs(+17 -0)📝
src/EchoHub.Server.Irc/IrcCommandHandler.cs(+5 -2)📝
src/EchoHub.Server.Irc/IrcGatewayService.cs(+2 -1)📝
src/EchoHub.Server/Controllers/ChannelsController.cs(+37 -110)📝
src/EchoHub.Server/Program.cs(+1 -0)➕
src/EchoHub.Server/Services/ChannelService.cs(+247 -0)📝
src/EchoHub.Server/Services/ChatService.cs(+8 -68)📝
src/EchoHub.Tests/Irc/IrcCommandHandlerTests.cs(+7 -6)📝
src/EchoHub.Tests/Irc/TestHelpers.cs(+37 -6)📄 Description
Extract channel logic into dedicated ChannelService + status bar improvements
Changes
ChannelsControllerandChatServiceinto a newIChannelService/ChannelServicesingletonChannelsControlleris now a thin adapter — delegates toIChannelServiceand mapsChannelErrorenum to HTTP status codes viaMapChannelError()ChatService.JoinChannelAsyncdelegates channel validation + membership toIChannelService.EnsureChannelMembershipAsync(), keeping only presence tracking + broadcasting + historyChannelOperationResultresult type withChannelErrorenum (ValidationFailed,AlreadyExists,NotFound,Forbidden,Protected) for typed error handling across service boundariesIrcCommandHandler) now usesIChannelServicefor topic queries and channel listing instead ofIChatServiceGetChannelTopicAsync,GetChannelListAsync, andChannelListItemfromIChatService(moved toIChannelService)#generalchannel auto-recreation if missing,/leaveprevention on#general, connect-while-connected guardFakeChannelServicetest helper; updated all IRC handler tests for new dependencyScreenshots / recordings (optional)
How to test
dotnet build— all projects (Core, Server, Server.Irc, Client, Tests) compile with 0 errorsdotnet test— all 346 tests passChecklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.