Implement exporting from a specific start date and fix few bugs

This commit is contained in:
Jaiwanth
2021-06-11 12:04:05 +05:30
parent 80e5d4cd77
commit a1b614f2b3
6 changed files with 52 additions and 41 deletions
+7 -2
View File
@@ -14,15 +14,20 @@ export enum exportTypes {
LAST_N_MESSAGES = "LAST_N_MESSAGES",
}
export interface exportOptions {
startDate?: number;
numberOfMessages?: number;
}
const exportConversationalHistory = async (
room: Room,
format: string,
exportType: exportTypes,
exportTypeMetadata?: number,
exportOptions?: exportOptions,
) => {
switch (format) {
case exportFormats.HTML:
await new HTMLExporter(room, exportType, exportTypeMetadata).export();
await new HTMLExporter(room, exportType, exportOptions).export();
break;
case exportFormats.JSON:
break;