mirror of
https://github.com/RedWizardsLab/EchoHub.git
synced 2026-09-04 08:36:11 +02:00
- Introduced a new migration to add InviteCodes table and ReplyToMessageId column in Messages. - Updated ChatHub to support replying to messages. - Enhanced ChatService to handle message replies and validate reply targets. - Modified UserService to implement invite-only registration mode with invite code consumption. - Added configuration options for registration modes in appsettings. - Created unit tests for new features including invite code registration and message reply formatting.
16 lines
818 B
C#
16 lines
818 B
C#
using EchoHub.Core.DTOs;
|
|
|
|
namespace EchoHub.Core.Contracts;
|
|
|
|
public interface IUserService
|
|
{
|
|
// inviteCode is required when the server runs with Server:Registration = "invite";
|
|
// "closed" refuses all new accounts. Both REST and the IRC gateway funnel through here.
|
|
Task<UserOperationResult> RegisterUserAsync(string username, string password, string? displayName = null, string? inviteCode = null);
|
|
Task<UserOperationResult> AuthenticateUserAsync(string username, string password);
|
|
Task<UserProfileDto?> GetUserProfileAsync(string username);
|
|
Task<UserProfileDto?> GetUserByIdAsync(Guid userId);
|
|
Task<UserOperationResult> UpdateProfileAsync(Guid userId, string? displayName, string? bio, string? nicknameColor);
|
|
Task<UserOperationResult> SetAvatarAsync(Guid userId, string asciiArt);
|
|
}
|