Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

conversation export named after room #7992

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/utils/exportUtils/Exporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default abstract class Exporter {

protected async downloadZIP(): Promise<string | void> {
const brand = SdkConfig.get().brand;
const filenameWithoutExt = `${brand} - Chat Export - ${formatFullDateNoDay(new Date())}`;
const filenameWithoutExt = `${brand} - ${this.room.name} - Chat Export - ${formatFullDateNoDay(new Date())}`;
t3chguy marked this conversation as resolved.
Show resolved Hide resolved
const filename = `${filenameWithoutExt}.zip`;
const { default: JSZip } = await import('jszip');

Expand Down
2 changes: 1 addition & 1 deletion src/utils/exportUtils/JSONExport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export default class JSONExporter extends Exporter {
this.addFile("export.json", new Blob([text]));
await this.downloadZIP();
} else {
const fileName = `matrix-export-${formatFullDateNoDay(new Date())}.json`;
const fileName = `matrix-${this.room.name}-export-${formatFullDateNoDay(new Date())}.json`;
t3chguy marked this conversation as resolved.
Show resolved Hide resolved
this.downloadPlainText(fileName, text);
}

Expand Down
2 changes: 1 addition & 1 deletion src/utils/exportUtils/PlainTextExport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export default class PlainTextExporter extends Exporter {
this.addFile("export.txt", new Blob([text]));
await this.downloadZIP();
} else {
const fileName = `matrix-export-${formatFullDateNoDay(new Date())}.txt`;
const fileName = `matrix-${this.room.name}-export-${formatFullDateNoDay(new Date())}.txt`;
t3chguy marked this conversation as resolved.
Show resolved Hide resolved
this.downloadPlainText(fileName, text);
}

Expand Down