Add primitive groups and required channel

Adds server-side group and channel management, private invitations, member moderation, avatar handling, and required-channel configuration. This change also introduces SignalR group profile/member notifications, updates registration to atomically join required channels, and adds EF migration and test coverage for group membership, permissions, and invitation expiry rules.
This commit is contained in:
Artemy
2026-10-04 10:35:07 +07:00
parent fed8f518ee
commit 2e9d7e625e
48 changed files with 3593 additions and 167 deletions
+2
View File
@@ -12,6 +12,8 @@ public class ChatGroup
public Govor.Domain.Models.Reactions.ChannelReactionMode ReactionMode { get; set; }
public long ReactionPolicyVersion { get; set; }
public bool IsPrivate { get; set; }
public Guid? OwnerUserId { get; set; }
public DateTime CreatedAt { get; set; }
public List<GroupAdmins> Admins { get; set; } = new();
public List<GroupMembership> Members { get; set; } = new();
public List<GroupInvitation> InviteCodes { get; set; } = new();
+3 -1
View File
@@ -12,6 +12,8 @@ public class GroupInvitation
public DateTime EndDate { get; set; }
public DateTime CreatedAt { get; set; }
public int MaxParticipants { get; set; }
public int UsedCount { get; set; }
public bool IsRevoked { get; set; }
public List<Guid> GroupMemberships { get; set; } = new();
public User? UserMaker { get; set; }
}
}
@@ -0,0 +1,10 @@
namespace Govor.Domain.Models;
public enum GroupRole { Member, Admin, Owner }
public class ServerCommunitySettings
{
public int Id { get; set; } = 1;
public Guid? RequiredChannelId { get; set; }
public bool AllowLeave { get; set; } = true;
}