mirror of
https://github.com/mastodon/mastodon.git
synced 2026-09-27 13:58:12 -05:00
Status redesign: Media attachments (#40673)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user