Only show error toast when importing unknown frames
This commit is contained in:
parent
5bdb39a95b
commit
cf5dc4b940
1 changed files with 12 additions and 2 deletions
|
@ -503,9 +503,19 @@ export class BackupImportStream extends Writable {
|
||||||
await this.#fromStickerPack(frame.stickerPack);
|
await this.#fromStickerPack(frame.stickerPack);
|
||||||
} else if (frame.adHocCall) {
|
} else if (frame.adHocCall) {
|
||||||
await this.#fromAdHocCall(frame.adHocCall);
|
await this.#fromAdHocCall(frame.adHocCall);
|
||||||
|
} else if (frame.notificationProfile) {
|
||||||
|
log.warn(
|
||||||
|
`${this.#logId}: Received currently unsupported feature: notification profile. Dropping.`
|
||||||
|
);
|
||||||
|
} else if (frame.chatFolder) {
|
||||||
|
log.warn(
|
||||||
|
`${this.#logId}: Received currently unsupported feature: chat folder. Dropping.`
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
log.warn(`${this.#logId}: unsupported frame item ${frame.item}`);
|
log.warn(
|
||||||
throw new Error('Unsupported frame type');
|
`${this.#logId}: unknown unsupported frame item ${frame.item}`
|
||||||
|
);
|
||||||
|
throw new Error('Unknown unsupported frame type');
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.#frameErrorCount += 1;
|
this.#frameErrorCount += 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue