mirror of
https://github.com/Stone-Red-Code/EchoHub.git
synced 2026-09-04 00:56:05 +02:00
2.7 KiB
2.7 KiB
v0.2.5 - Audio Playback, File Downloads & IRC Fixes
Features
Audio Message Support
- New
Audiomessage type — uploaded audio files (.mp3,.wav,.ogg,.flac,.aac,.m4a,.wma) are automatically detected and categorized - TUI client renders audio messages with
♪ [Audio: filename] (Enter to play)indicator - Press Enter on an audio message to play it locally via
AudioPlaybackService(NetCoreAudio) - IRC gateway formats audio messages as
♪ [Audio: filename] url - Server detects audio files by extension via
FileValidationHelper.IsAudioFile()
File Downloads
- Press Enter on a file message in the TUI client to download it to the local machine
ApiClient.DownloadFileAsync()streams file downloads from the server- File and audio messages in the chat list now show colored indicators with interaction hints
File Cleanup Service
FileCleanupService(BackgroundService) periodically removes old uploaded files- Configurable via
Storage:CleanupIntervalHours(default 1h) andStorage:RetentionDays(default 30d)
Data Migration Service
DataMigrationServiceruns at startup to handle schema/data evolution- Ensures
#generalchannel and pre-existing channels are marked public - Migrates legacy ANSI escape codes in image messages to printable color tags (
{F:RRGGBB},{B:RRGGBB},{X}) - Migrates legacy single-object
EmbedJsonto array format - Promotes usernames listed in
Server:Adminsconfig to Admin role
Fixes
IRC Gateway
- Fixed: IRC JOIN history replay showed encrypted gibberish —
IrcCommandHandler.HandleJoinAsyncnow decrypts channel history before formatting for IRC clients (history was encrypted for SignalR transport but sent raw to IRC) - Fixed:
JoinedChannelsrace condition —IrcClientConnection.JoinedChannelsreplaced with thread-safe methods (JoinChannel,LeaveChannel,IsInChannel,GetJoinedChannels) using lock synchronization; prevents crashes when broadcaster threads read while the command handler writes - Fixed:
RequireRegisteredfire-and-forget — converted from syncbooltoasync Task<bool>(RequireRegisteredAsync) so the error reply is properly awaited before the handler returns
Infrastructure
- Audio MIME types in
FilesController(mp3, wav, ogg, flac, aac, m4a, wma) - Test suites: ChatLine, CommandHandler, DataMigrationService, FileValidationHelper, ImageToAsciiService, IrcMessageFormatter, JwtTokenService, LinkEmbedService
- IRC abstraction layer test suite: IrcMessage parsing, IrcMessageFormatter, IrcClientConnection, IrcCommandHandler, IrcBroadcaster
- Test helpers:
TestDuplexStream,TestIrcConnectionFactory,FakeChatService,FakeEncryptionServicefor IRC unit testing without network I/O - 214 total tests