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:
HueByte
2026-07-16 07:04:58 +02:00
parent dbf6565d18
commit e797ec2542
22 changed files with 526 additions and 93 deletions
+18
View File
@@ -472,4 +472,22 @@ public class CommandHandlerTests
Assert.True(result.Handled);
Assert.True(quitCalled);
}
// ── /meta ─────────────────────────────────────────────────────────
[Theory]
[InlineData("/meta")]
[InlineData("/info")]
public async Task HandleAsync_Meta_RaisesRoomInfo(string input)
{
var handler = CreateHandler();
var raised = false;
handler.OnRoomInfo += () => { raised = true; return Task.CompletedTask; };
var result = await handler.HandleAsync(input);
Assert.True(result.Handled);
Assert.False(result.IsError);
Assert.True(raised);
}
}