Skip to content
Snippets Groups Projects
Unverified Commit 03cac4f3 authored by Douglas Fabris's avatar Douglas Fabris Committed by GitHub
Browse files

feat: Includes attachments metadata in JSON when exporting messages (#35113)

parent c3c27250
No related branches found
No related tags found
No related merge requests found
---
'@rocket.chat/meteor': minor
---
Includes attachments metadata in JSON export if type is file when exporting messages
......@@ -8,7 +8,29 @@ import { Messages } from '../../../../../app/models/client';
import { downloadJsonAs } from '../../../../lib/download';
import { useRoom } from '../../contexts/RoomContext';
const messagesFields: FindOptions<IMessage> = { projection: { _id: 1, ts: 1, u: 1, msg: 1, _updatedAt: 1, tlm: 1, replies: 1, tmid: 1 } };
const messagesFields: FindOptions<IMessage> = {
projection: {
'_id': 1,
'ts': 1,
'u': 1,
'msg': 1,
'_updatedAt': 1,
'tlm': 1,
'replies': 1,
'tmid': 1,
'attachments.ts': 1,
'attachments.title': 1,
'attachments.title_link': 1,
'attachments.title_link_download': 1,
'attachments.image_dimensions': 1,
'attachments.image_preview': 1,
'attachments.image_url': 1,
'attachments.image_type': 1,
'attachments.image_size': 1,
'attachments.type': 1,
'attachments.description': 1,
},
};
export const useDownloadExportMutation = () => {
const { t } = useTranslation();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment