a fork of iceshrimp.net but a tweaked frontend to my personal liking. waow
fediverse social-media social iceshrimp fedi
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

[backend/masto-client] Add /instance/extended_description endpoint (ISH-95)

+18 -1
+10 -1
Iceshrimp.Backend/Controllers/Mastodon/InstanceController.cs
··· 47 47 var activeMonth = await db.Users.LongCountAsync(p => p.Host == null && 48 48 !Constants.SystemUsers.Contains(p.UsernameLower) && 49 49 p.LastActiveDate > cutoff); 50 - 50 + 51 51 var instanceName = await meta.Get(MetaEntity.InstanceName); 52 52 var instanceDescription = await meta.Get(MetaEntity.InstanceDescription); 53 53 var adminContact = await meta.Get(MetaEntity.AdminContactEmail); ··· 83 83 public IActionResult GetTranslationLanguages() 84 84 { 85 85 return Ok(new Dictionary<string, IEnumerable<string>>()); 86 + } 87 + 88 + [HttpGet("/api/v1/instance/extended_description")] 89 + [ProducesResponseType(StatusCodes.Status200OK, Type = typeof(InstanceExtendedDescription))] 90 + public async Task<IActionResult> GetExtendedDescription() 91 + { 92 + var description = await meta.Get(MetaEntity.InstanceDescription); 93 + var res = new InstanceExtendedDescription(description); 94 + return Ok(res); 86 95 } 87 96 }
+8
Iceshrimp.Backend/Controllers/Mastodon/Schemas/InstanceInfoV2Response.cs
··· 60 60 public class InstanceContact(string? adminContact) 61 61 { 62 62 [J("email")] public string Email => adminContact ?? "unset@example.org"; 63 + } 64 + 65 + public class InstanceExtendedDescription(string? description) 66 + { 67 + [J("updated_at")] public string UpdatedAt => DateTime.Now.ToStringIso8601Like(); 68 + 69 + [J("content")] 70 + public string Content => description ?? "This Iceshrimp.NET instance does not appear to have a description"; 63 71 }