feat: add E2EE DMs, group chats, local serversettings.json, and security/perf fixes

This commit is contained in:
tyuXX 2026-10-17 13:16:42 +00:00
parent b60b5a0774
commit 3b52de20d1
33 changed files with 5107 additions and 366 deletions

View file

@ -1,13 +1,28 @@
using System;
using System.Collections.Generic;
namespace GsDChat.Core.Models;
public static class ChannelTypes
{
public const string Channel = "Channel";
public const string DirectMessage = "DM";
public const string Group = "Group";
}
public class Channel
{
public string Id { get; set; } = Guid.NewGuid().ToString("N");
public string Name { get; set; } = string.Empty;
public string Topic { get; set; } = string.Empty;
public string Type { get; set; } = ChannelTypes.Channel;
public bool IsPrivate { get; set; } = false;
public bool IsE2ee { get; set; } = false;
public string CreatorId { get; set; } = string.Empty;
public int MaxUsers { get; set; } = 0;
public string AllowedRoles { get; set; } = string.Empty; // Comma-separated or empty for public
public List<string> MemberIds { get; set; } = new();
public List<string> MemberUsernames { get; set; } = new();
public Dictionary<string, string> MemberPublicKeys { get; set; } = new();
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
}