расшифровка гс

This commit is contained in:
Jganenok
2026-05-14 12:34:07 +07:00
parent dc752e8b0d
commit bc545df1e7
6 changed files with 440 additions and 109 deletions
+6
View File
@@ -170,6 +170,10 @@ abstract class Opcode {
static const int notifBanners = 292; // Баннеры
static const int notifFolders = 277; // Обновление папок
// ── Transcription ───────────────────────────────────────────────────
static const int audioTranscription = 202; // Запрос транскрибации аудио
static const int transcriptionResult = 293; // Результат транскрибации (push)
// ── Misc ───────────────────────────────────────────────────────────
static const int okToken = 158; // OK-токен
static const int webAppInitData = 160; // Данные WebApp
@@ -332,6 +336,8 @@ abstract class Opcode {
notifProfile: 'NOTIF_PROFILE',
notifBanners: 'NOTIF_BANNERS',
notifFolders: 'NOTIF_FOLDERS',
audioTranscription: 'AUDIO_TRANSCRIPTION',
transcriptionResult: 'TRANSCRIPTION_RESULT',
okToken: 'OK_TOKEN',
webAppInitData: 'WEB_APP_INIT_DATA',
complain: 'COMPLAIN',
+5 -1
View File
@@ -53,8 +53,12 @@ class PacketDispatcher {
if (packet.cmd == CmdType.ok ||
packet.cmd == CmdType.error ||
packet.cmd == CmdType.notFound) {
final payloadStr = packet.payload.toString();
final displayPayload = packet.opcode == Opcode.login && payloadStr.length > 50
? '${payloadStr.substring(0, 50)}...'
: payloadStr;
logger.i(
'<= {ver: ${packet.api}, cmd: ${packet.cmd}, seq: ${packet.seq}, opcode: ${packet.opcode}, payload: ${packet.payload}}',
'<= {ver: ${packet.api}, cmd: ${packet.cmd}, seq: ${packet.seq}, opcode: ${packet.opcode}, payload: $displayPayload}',
);
final completer = _pendingRequests.remove(packet.seq);