[backend/akko-client] Revert hacky workaround on /api/v1/pleroma/emoji

I've decided to patch the frontend itself to accept this correctly.
This commit is contained in:
Kopper 2024-09-06 07:50:47 +03:00 committed by Iceshrimp development
parent 79427e2901
commit 30af407865

View file

@ -24,8 +24,7 @@ public class EmojiController(DatabaseContext db) : ControllerBase
var emoji = await db.Emojis.Where(p => p.Host == null) var emoji = await db.Emojis.Where(p => p.Host == null)
.Select(p => KeyValuePair.Create(p.Name, new PleromaEmojiEntity .Select(p => KeyValuePair.Create(p.Name, new PleromaEmojiEntity
{ {
// TODO: akkoma-fe expects *relative paths* instead of absolute URLs... i genuinely think this is unfixable without forking the fe ImageUrl = p.PublicUrl,
ImageUrl = new Uri(p.PublicUrl).AbsolutePath,
Tags = new string[] { p.Category == null ? "" : p.Category } Tags = new string[] { p.Category == null ? "" : p.Category }
})) }))
.ToArrayAsync(); .ToArrayAsync();