@mtcute/core 0.20.2 → 0.20.4
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/highlevel/methods/files/normalize-input-media.cjs +1 -1
- package/highlevel/methods/files/normalize-input-media.js +1 -1
- package/network/network-manager.cjs +1 -1
- package/network/network-manager.js +1 -1
- package/network/persistent-connection.cjs +2 -1
- package/network/persistent-connection.js +2 -1
- package/package.json +1 -1
|
@@ -359,7 +359,7 @@ async function _normalizeInputMedia(client, media, params = {}, uploadMedia = fa
|
|
|
359
359
|
return uploadMediaIfNeeded(
|
|
360
360
|
{
|
|
361
361
|
_: "inputMediaUploadedDocument",
|
|
362
|
-
nosoundVideo: media.type === "video" && media.isAnimated,
|
|
362
|
+
nosoundVideo: media.type === "video" && !media.isAnimated,
|
|
363
363
|
forceFile: media.type === "document",
|
|
364
364
|
file: inputFile,
|
|
365
365
|
thumb,
|
|
@@ -352,7 +352,7 @@ async function _normalizeInputMedia(client, media, params = {}, uploadMedia = fa
|
|
|
352
352
|
return uploadMediaIfNeeded(
|
|
353
353
|
{
|
|
354
354
|
_: "inputMediaUploadedDocument",
|
|
355
|
-
nosoundVideo: media.type === "video" && media.isAnimated,
|
|
355
|
+
nosoundVideo: media.type === "video" && !media.isAnimated,
|
|
356
356
|
forceFile: media.type === "document",
|
|
357
357
|
file: inputFile,
|
|
358
358
|
thumb,
|
|
@@ -172,7 +172,8 @@ class PersistentConnection {
|
|
|
172
172
|
try {
|
|
173
173
|
await this._writer.write(data);
|
|
174
174
|
} catch (e) {
|
|
175
|
-
this.log.warn("encountered an error
|
|
175
|
+
this.log.warn("encountered an error while sending, reconnecting: %e", e);
|
|
176
|
+
this._writer = void 0;
|
|
176
177
|
this._fuman.reconnect(true);
|
|
177
178
|
this._sendOnceConnected.push(data);
|
|
178
179
|
}
|
|
@@ -165,7 +165,8 @@ class PersistentConnection {
|
|
|
165
165
|
try {
|
|
166
166
|
await this._writer.write(data);
|
|
167
167
|
} catch (e) {
|
|
168
|
-
this.log.warn("encountered an error
|
|
168
|
+
this.log.warn("encountered an error while sending, reconnecting: %e", e);
|
|
169
|
+
this._writer = void 0;
|
|
169
170
|
this._fuman.reconnect(true);
|
|
170
171
|
this._sendOnceConnected.push(data);
|
|
171
172
|
}
|