Ver código fonte

Workaround for #3: You need to patch matrix-js-sdk for a longer timeout

ar 3 anos atrás
1 arquivos alterados com 8 adições e 0 exclusões
  1. 8

+ 8
- 0 Ver arquivo

@@ -15,6 +15,14 @@ To use Matrix Recorder, you need to have installed a recent version of [Node.js]

The last line will install all required dependencies in the `node_modules` subfolder.

### Long-running pulls from homeserver

Note: Newer `matrix-js-sdk` versions work with a hardcoded timeout of 80 seconds for the initial sync - if no data is received during those 80 seconds, it will throw a `ORG.MATRIX.JSSDK_TIMEOUT` error and exit. Unfortunately, at the moment this is not a setting we can overwrite from Matrix Recorder. So if you experience this issue, you need to manually patch `matrix-js-sdk` by giving a longer period (such as an hour) for the `BUFFER_PERIOD_MS` constant in the `lib/sync.js` module:

sed -i "" "s/var BUFFER_PERIOD_MS = 80 \\* 1000;/var BUFFER_PERIOD_MS = 3600 \\* 1000;/" node_modules/matrix-js-sdk/lib/sync.js

If you run `npm install` again to upgrade to a newer version of `matrix-js-sdk`, you will have to re-perform the patch. We are currently looking into how to make that configurable.

## Usage
If Matrix Recorder is installed properly, you can use it by telling it where you want to store your session data and the retrieved message data (this should be an empty or to-be-created directory), for example like this (you need to run it from the folder you installed it in above):