jsir 2.3.5 → 2.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/deps/room.js +4 -1
- package/package.json +1 -1
package/deps/room.js
CHANGED
|
@@ -117,7 +117,7 @@ async function syncRooms() {
|
|
|
117
117
|
await fileLock(roomsDirLockKey, async () => {
|
|
118
118
|
for (let syncRoom of syncRooms) {
|
|
119
119
|
if (syncRoom.selfNode) {
|
|
120
|
-
await fp.writeFile(syncRoom.selfNode, JSON.stringify(syncRoom, null, 2))
|
|
120
|
+
await fp.writeFile(roomsDir + "/" + syncRoom.selfNode, JSON.stringify(syncRoom, null, 2))
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
})
|
|
@@ -148,6 +148,9 @@ async function _syncSetting(room) {
|
|
|
148
148
|
let rooms = []
|
|
149
149
|
let files = await fp.readdir(roomDir);
|
|
150
150
|
for (let node of setting.selfRoom.nodes) {
|
|
151
|
+
if (setting.selfRoom.selfNode === node) {
|
|
152
|
+
continue
|
|
153
|
+
}
|
|
151
154
|
if (files.indexOf(node) !== -1) {
|
|
152
155
|
let resp = String(await fp.readFile(roomDir + '/' + node));
|
|
153
156
|
let room = JSON.parse(resp);
|