refactor to share downloading code across all formats

This commit is contained in:
Jaiwanth 2021-06-25 11:16:59 +05:30
parent 91b8b2ac5a
commit 3718826e94
7 changed files with 83 additions and 118 deletions

View file

@ -84,11 +84,11 @@ export default class RoomHeader extends React.Component {
_exportConversationalHistory = async () => {
await exportConversationalHistory(
this.props.room,
exportFormats.JSON,
exportFormats.PLAIN_TEXT,
exportTypes.START_DATE,
{
startDate: parseInt(new Date("2021.05.20").getTime().toFixed(0)),
attachmentsIncluded: false,
attachmentsIncluded: true,
maxSize: 7 * 1024 * 1024, // 7 MB
},
);