Status redesign: Media attachments (#40673)

This commit is contained in:
Echo
2026-09-23 15:29:00 +00:00
committed by GitHub
parent 99509ca17c
commit 2b0e8b47fa
14 changed files with 288 additions and 74 deletions

View File

@@ -263,21 +263,13 @@ export function mediaAttachmentFactoryAPI(
): ApiMediaAttachmentJSON {
switch (data.type ?? 'image') {
case 'image':
return imageAttachmentFactoryAPI(
data as PartialDeep<ApiImageAttachmentJSON>,
);
return imageAttachmentFactoryAPI(data);
case 'video':
return videoAttachmentFactoryAPI(
data as PartialDeep<ApiVideoAttachmentJSON>,
);
return videoAttachmentFactoryAPI(data);
case 'audio':
return audioAttachmentFactoryAPI(
data as PartialDeep<ApiAudioAttachmentJSON>,
);
return audioAttachmentFactoryAPI(data);
case 'gifv':
return gifvAttachmentFactoryAPI(
data as PartialDeep<ApiGifvAttachmentJSON>,
);
return gifvAttachmentFactoryAPI(data);
default: {
return {
...baseAttachment,