mirror of
https://github.com/RedWizardsLab/EchoHub.git
synced 2026-09-04 08:36:11 +02:00
feat: add password protection for channels
- Updated IChatService to include password parameter in JoinChannelAsync method. - Modified ChannelDto and related models to support password functionality. - Implemented password handling in ChannelService for channel creation and membership validation. - Enhanced IrcCommandHandler to manage channel join requests with passwords. - Added ChannelPasswordDialog for user input when joining protected channels. - Created database migration to add PasswordHash column to Channels table. - Updated tests to cover new password functionality in channel joining and management.
This commit is contained in:
@@ -21,7 +21,8 @@ public record ChannelDto(
|
||||
string? Topic,
|
||||
bool IsPublic,
|
||||
int MessageCount,
|
||||
DateTimeOffset CreatedAt);
|
||||
DateTimeOffset CreatedAt,
|
||||
bool IsProtected = false);
|
||||
|
||||
public record UserDto(
|
||||
Guid Id,
|
||||
@@ -33,13 +34,13 @@ public record UserDto(
|
||||
|
||||
public record SendMessageRequest(string ChannelName, string Content);
|
||||
|
||||
public record CreateChannelRequest(string Name, string? Topic = null, bool IsPublic = true);
|
||||
public record CreateChannelRequest(string Name, string? Topic = null, bool IsPublic = true, string? Password = null);
|
||||
|
||||
public record UpdateTopicRequest(string? Topic);
|
||||
|
||||
public record SendUrlRequest(string Url);
|
||||
|
||||
public record JoinChannelResult(bool Success, List<MessageDto> History, string? Error = null);
|
||||
public record JoinChannelResult(bool Success, List<MessageDto> History, string? Error = null, bool PasswordRequired = false);
|
||||
|
||||
public record EmbedDto(
|
||||
string? SiteName,
|
||||
|
||||
Reference in New Issue
Block a user