feat: add E2EE DMs, group chats, local serversettings.json, and security/perf fixes
This commit is contained in:
parent
b60b5a0774
commit
3b52de20d1
33 changed files with 5107 additions and 366 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue