You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

actions.web.ts 547B

12345678910111213141516171819
  1. import { IStore } from '../app/types';
  2. import getRoomName from '../base/config/getRoomName';
  3. import { downloadJSON } from '../base/util/downloadJSON';
  4. /**
  5. * Create an action for saving the conference logs.
  6. *
  7. * @returns {Function}
  8. */
  9. export function saveLogs() {
  10. return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
  11. const logs = getState()['features/base/connection'].connection?.getLogs();
  12. const roomName = getRoomName() || '';
  13. downloadJSON(logs ?? {}, `meetlog-${roomName}.json`);
  14. };
  15. }