mirror of
https://github.com/RedWizardsLab/EchoHub.git
synced 2026-09-05 07:36:03 +02:00
feat: add /meta command for channel metadata retrieval
- Implemented the `/meta` command to fetch and display channel metadata including room ID, topic, message count, unique user count, estimated size, and protection level. - Added `ChannelMetaDto` to encapsulate channel metadata. - Updated `ChannelsController` to handle the new `/meta` endpoint. - Introduced `UploadLimits` configuration for admin-defined upload size limits for files, images, audio, and avatars. - Enhanced error handling and user feedback for metadata retrieval. - Updated documentation to reflect changes in encryption and room metadata. - Added tests for the new functionality and upload limits.
This commit is contained in:
@@ -58,6 +58,23 @@ public record CreateChannelRequest(
|
||||
/// </summary>
|
||||
public record ChannelCryptoDto(bool IsEncrypted, string? EncryptionSalt);
|
||||
|
||||
/// <summary>
|
||||
/// Human-facing summary of a channel (the <c>/meta</c> command). For encrypted channels the
|
||||
/// server still knows these figures — count, timestamps, and stored blob sizes — even though it
|
||||
/// cannot read the content itself. <see cref="EstimatedSizeBytes"/> is the sum of stored
|
||||
/// attachment blob sizes plus message text length, so it is an estimate, not an exact on-disk total.
|
||||
/// </summary>
|
||||
public record ChannelMetaDto(
|
||||
Guid Id,
|
||||
string Name,
|
||||
string? Topic,
|
||||
bool IsEncrypted,
|
||||
bool IsProtected,
|
||||
int MessageCount,
|
||||
int UniqueUserCount,
|
||||
long EstimatedSizeBytes,
|
||||
DateTimeOffset CreatedAt);
|
||||
|
||||
/// <summary>
|
||||
/// Passphrase change for an encrypted channel: the client proves knowledge of the old
|
||||
/// passphrase (old auth key), then supplies the re-wrapped room key under the new one.
|
||||
|
||||
Reference in New Issue
Block a user