fix(transport): Zstd-распаковка, гонка PacketReceiver, fix имён и стикеров

This commit is contained in:
klockky
2026-05-14 13:12:41 +03:00
parent 07d39ffa24
commit 177c1c3cc4
10 changed files with 137 additions and 40 deletions
+9 -1
View File
@@ -266,7 +266,15 @@ class Api {
}
Future<void> _onDataReceived(Uint8List data) async {
await for (final packet in _receiver.feed(data)) {
final rawPackets = _receiver.feed(data);
for (final raw in rawPackets) {
final Packet packet;
try {
packet = await unpackPacket(raw);
} catch (e) {
logger.e('PacketReceiver: ошибка распаковки: $e');
continue;
}
if (packet.isError &&
packet.payload is Map &&
(packet.payload['message'] == 'FAIL_LOGIN_TOKEN' ||