- Add back in persistent storage

- Receive node now accepts video files
This commit is contained in:
2022-12-06 21:49:05 -07:00
parent c7f9d56df2
commit 2fdc7482ce
3 changed files with 33 additions and 1 deletions
+4 -1
View File
@@ -4,7 +4,7 @@ const sdk = require("matrix-js-sdk");
const { resolve } = require('path');
const { LocalStorage } = require('node-localstorage');
const { LocalStorageCryptoStore } = require('matrix-js-sdk/lib/crypto/store/localStorage-crypto-store');
const {RoomEvent, RoomMemberEvent, HttpApiEvent, ClientEvent} = require("matrix-js-sdk");
const {RoomEvent, RoomMemberEvent, HttpApiEvent, ClientEvent, MemoryStore} = require("matrix-js-sdk");
const request = require("request");
require("abort-controller/polyfill"); // polyfill abort-controller if we don't have it
if (!globalThis.fetch) {
@@ -138,6 +138,9 @@ module.exports = function(RED) {
baseUrl: this.url,
accessToken: this.credentials.accessToken,
cryptoStore: new LocalStorageCryptoStore(localStorage),
store: new MemoryStore({
localStorage: localStorage,
}),
userId: this.userId,
deviceId: (this.deviceId || getStoredDeviceId(localStorage)) || undefined,
request