расшифровка гс
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user