mirror of
https://github.com/Skylar-Tech/node-red-contrib-matrix-chat.git
synced 2025-07-08 11:41:07 -06:00
Compare commits
2 Commits
97f27e61c6
...
bd4f6ea486
Author | SHA1 | Date | |
---|---|---|---|
bd4f6ea486 | |||
5ef0b6a11f |
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "node-red-contrib-matrix-chat",
|
||||
"version": "0.5.8",
|
||||
"version": "0.6.1",
|
||||
"description": "Matrix chat server client for Node-RED",
|
||||
"dependencies": {
|
||||
"fs-extra": "^10.0.1",
|
||||
|
@ -5,8 +5,6 @@ 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 {deriveKey} = require("matrix-js-sdk/lib/crypto/key_passphrase");
|
||||
const {encryptAES} = require("matrix-js-sdk/lib/crypto/aes");
|
||||
|
||||
module.exports = function(RED) {
|
||||
function MatrixFolderNameFromUserId(name) {
|
||||
@ -466,7 +464,7 @@ module.exports = function(RED) {
|
||||
fs.renameSync(oldStorageDir, oldStorageDir + "-backup");
|
||||
}
|
||||
|
||||
if(RED.settings.userDir !== resolve('./')) {
|
||||
if(RED.settings.userDir !== resolve('./') && resolve(oldStorageDir2) !== resolve(storageDir)) {
|
||||
// user directory does not match running directory
|
||||
// check if we stored stuff in wrong directory and move it
|
||||
if(fs.pathExistsSync(oldStorageDir2)){
|
||||
|
Loading…
x
Reference in New Issue
Block a user