feat: include width, height, duration in all attachment serialization
This commit is contained in:
@@ -88,6 +88,9 @@ export function buildDmMessageWithUser(
|
|||||||
mimetype: a.mimetype,
|
mimetype: a.mimetype,
|
||||||
size: a.size,
|
size: a.size,
|
||||||
thumbnailFilename: a.thumbnailFilename ?? null,
|
thumbnailFilename: a.thumbnailFilename ?? null,
|
||||||
|
width: a.width ?? null,
|
||||||
|
height: a.height ?? null,
|
||||||
|
duration: a.duration ?? null,
|
||||||
createdAt: a.createdAt,
|
createdAt: a.createdAt,
|
||||||
})),
|
})),
|
||||||
embeds: embedRows.map(e => embedRowToEmbed(e)),
|
embeds: embedRows.map(e => embedRowToEmbed(e)),
|
||||||
|
|||||||
@@ -114,6 +114,10 @@ export function fetchReplyToMessages(messages: (typeof schema.messages.$inferSel
|
|||||||
originalName: a.originalName,
|
originalName: a.originalName,
|
||||||
mimetype: a.mimetype,
|
mimetype: a.mimetype,
|
||||||
size: a.size,
|
size: a.size,
|
||||||
|
thumbnailFilename: a.thumbnailFilename ?? null,
|
||||||
|
width: a.width ?? null,
|
||||||
|
height: a.height ?? null,
|
||||||
|
duration: a.duration ?? null,
|
||||||
createdAt: a.createdAt,
|
createdAt: a.createdAt,
|
||||||
})),
|
})),
|
||||||
embeds: [],
|
embeds: [],
|
||||||
@@ -149,6 +153,9 @@ export function buildMessageWithUser(
|
|||||||
mimetype: a.mimetype,
|
mimetype: a.mimetype,
|
||||||
size: a.size,
|
size: a.size,
|
||||||
thumbnailFilename: a.thumbnailFilename ?? null,
|
thumbnailFilename: a.thumbnailFilename ?? null,
|
||||||
|
width: a.width ?? null,
|
||||||
|
height: a.height ?? null,
|
||||||
|
duration: a.duration ?? null,
|
||||||
createdAt: a.createdAt,
|
createdAt: a.createdAt,
|
||||||
})),
|
})),
|
||||||
embeds: embedRows.map(e => embedRowToEmbed(e)),
|
embeds: embedRows.map(e => embedRowToEmbed(e)),
|
||||||
|
|||||||
@@ -62,6 +62,9 @@ function getMessageWithUser(messageId: string): MessageWithUser | null {
|
|||||||
mimetype: a.mimetype,
|
mimetype: a.mimetype,
|
||||||
size: a.size,
|
size: a.size,
|
||||||
thumbnailFilename: a.thumbnailFilename ?? null,
|
thumbnailFilename: a.thumbnailFilename ?? null,
|
||||||
|
width: a.width ?? null,
|
||||||
|
height: a.height ?? null,
|
||||||
|
duration: a.duration ?? null,
|
||||||
createdAt: a.createdAt,
|
createdAt: a.createdAt,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user