diff --git a/src/chat/chat_core_priv.h b/src/chat/chat_core_priv.h index 1183cb32..43f341ce 100644 --- a/src/chat/chat_core_priv.h +++ b/src/chat/chat_core_priv.h @@ -97,6 +97,8 @@ struct chat_core_ctx { void* media_channel_backfill_timer; /* debounce per-channel докачки */ char media_channel_backfill[16][64]; /* pending ch_id */ int media_channel_backfill_pending; + void* attachment_timer; + int attachment_closing; }; /* Per-instance chat context. inst->chat_core обязателен после chat_core_init. */ diff --git a/src/chat/chat_event.h b/src/chat/chat_event.h index 90a5ba24..6ab462ea 100644 --- a/src/chat/chat_event.h +++ b/src/chat/chat_event.h @@ -81,6 +81,7 @@ extern "C" { #define CHAT_EVT_CPU_LOAD 57 /* [valid:1][average_percent:1] — CPU потока uasync, среднее за секунду, 0..100 */ #define CHAT_EVT_STREAM_SOURCES 58 /* [group_id:8BE][valid:1][JSON:utf8] — доступные публикации выбранного канала */ #define CHAT_EVT_DM_DELETE_RESULT 59 /* [request:8LE][conv:8LE][generation:8LE][success:1] — после транзакции */ +#define CHAT_EVT_ATTACHMENT_KEYS_CHANGED 60 /* [channel_len:1][channel][success?:1], без секретов; success — результат команды GUI */ typedef void (*chat_event_handler_fn)(struct UTUN_INSTANCE* inst, int type, const uint8_t* data, int len); diff --git a/src/transport_layer/etcp_api.h b/src/transport_layer/etcp_api.h index 2e995691..7a867a36 100644 --- a/src/transport_layer/etcp_api.h +++ b/src/transport_layer/etcp_api.h @@ -90,6 +90,7 @@ extern "C" { #define ETCP_RT_ID_MEMBER_FILES 0x39 // member_files — каталоги и файлы участников группы #define ETCP_RT_ID_GROUP_AVATAR 0x3A // подписанная аватарка группы, блоки до 4 КиБ #define ETCP_RT_ID_NAT_DETECTION 0x3B // управление NAT-пробами через маршруты выбранной группы +#define ETCP_RT_ID_ATTACHMENT_KEYS 0x40 // запросы и ручная E2E-выдача ключей групповых вложений // Connection status events (instance-level callback). // NEW начинает жизнь объекта, UP/DOWN отражают доступность, DELETE завершает её.