Begin extended implementation
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Room } from 'matrix-js-sdk/src/models/room';
|
||||
import { Room } from "matrix-js-sdk/src/models/room";
|
||||
import HTMLExporter from "./HtmlExport";
|
||||
|
||||
export enum exportFormats {
|
||||
@@ -7,14 +7,21 @@ export enum exportFormats {
|
||||
LOGS = "LOGS",
|
||||
}
|
||||
|
||||
export enum exportOptions {
|
||||
export enum exportTypes {
|
||||
TIMELINE = "TIMELINE",
|
||||
BEGINNING = "BEGINNING",
|
||||
LAST_N_MESSAGES = "LAST_N_MESSAGES",
|
||||
}
|
||||
|
||||
const exportConversationalHistory = async (room: Room, format: string, options) => {
|
||||
const exportConversationalHistory = async (
|
||||
room: Room,
|
||||
format: string,
|
||||
exportType: exportTypes,
|
||||
numberOfEvents?: number,
|
||||
) => {
|
||||
switch (format) {
|
||||
case exportFormats.HTML:
|
||||
await new HTMLExporter(room).export();
|
||||
await new HTMLExporter(room, exportType, numberOfEvents).export();
|
||||
break;
|
||||
case exportFormats.JSON:
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user