diff --git a/Iceshrimp.Backend/Controllers/Web/InstanceController.cs b/Iceshrimp.Backend/Controllers/Web/InstanceController.cs index 945b75c3..e6aa2a8f 100644 --- a/Iceshrimp.Backend/Controllers/Web/InstanceController.cs +++ b/Iceshrimp.Backend/Controllers/Web/InstanceController.cs @@ -30,12 +30,15 @@ public class InstanceController( [ProducesResults(HttpStatusCode.OK)] public async Task GetInfo() { + var limits = new Limitations { NoteLength = instanceConfig.Value.CharacterLimit }; + return new InstanceResponse { AccountDomain = instanceConfig.Value.AccountDomain, WebDomain = instanceConfig.Value.WebDomain, Registration = (Registrations)securityConfig.Value.Registrations, - Name = await meta.GetAsync(MetaEntity.InstanceName) + Name = await meta.GetAsync(MetaEntity.InstanceName), + Limits = limits }; } diff --git a/Iceshrimp.Shared/Schemas/Web/InstanceResponse.cs b/Iceshrimp.Shared/Schemas/Web/InstanceResponse.cs index 131ea131..b5d52e1b 100644 --- a/Iceshrimp.Shared/Schemas/Web/InstanceResponse.cs +++ b/Iceshrimp.Shared/Schemas/Web/InstanceResponse.cs @@ -6,6 +6,7 @@ public class InstanceResponse public required string WebDomain { get; set; } public required Registrations Registration { get; set; } public required string? Name { get; set; } + public required Limitations Limits { get; set; } } public class StaffResponse @@ -19,4 +20,9 @@ public enum Registrations Closed = 0, Invite = 1, Open = 2 +} + +public class Limitations +{ + public required int NoteLength { get; set; } } \ No newline at end of file