feat: add /api/messages/images endpoint + ImageGrid fetch
Backend: - New GET /api/messages/images?guildId=&limit= endpoint - Queries attachments table for image/* MIME type, returns distinct messages - Repository uses Drizzle subquery + join pattern Frontend: - New get_images() API client function - ImageGrid fetches from /api/messages/images when Images tab selected - Separate image_messages signal, fetched on tab switch Deploy: hot-patched JS/WASM files to running containers
This commit is contained in:
@@ -46,6 +46,18 @@ export class MessagesService {
|
||||
return messagesRepository.getAttachmentsByChannel(channelId, query);
|
||||
}
|
||||
|
||||
async getImageMessages(
|
||||
guildId: string,
|
||||
limit?: number,
|
||||
): Promise<ReturnType<typeof messagesRepository.getImageMessages>> {
|
||||
if (!guildId) {
|
||||
throw new ValidationError("guildId is required");
|
||||
}
|
||||
|
||||
logger.debug({ guildId, limit }, "Getting image messages");
|
||||
return messagesRepository.getImageMessages(guildId, limit);
|
||||
}
|
||||
|
||||
async markForReanalysis(id: string): Promise<void> {
|
||||
if (!id) {
|
||||
throw new ValidationError("message ID is required");
|
||||
|
||||
Reference in New Issue
Block a user