feat(chat): add local DM deletion and improve Android member list
Delete local conversations atomically, retain replay protection and sequence counters, and guard asynchronous media work by history generation. Add Android avatar menu and confirmation, persistent file cleanup, and regression coverage. Fix unnamed member wire padding and compact Android member action spacing. Validation: 158 core tests passed; targeted DM tests, desktop build, Android unit tests and debug APK build passed.
This commit is contained in:
1 parent
97710b609f
commit
be295f768c
38 files changed
+1005
-126
No files matched your search
+7
-1
@@ -86,6 +86,11 @@ int dm_start(struct UTUN_INSTANCE* inst, uint64_t peer_node_id,
|
||||
int dm_send(struct UTUN_INSTANCE* inst, const char* conv_id, const char* content_type,
|
||||
const uint8_t* data, uint32_t data_len);
|
||||
|
||||
/* Локальное удаление; generation защищает повторно открытую беседу от старого запроса. */
|
||||
struct dm_delete_req { struct UTUN_INSTANCE* inst; char conv_id[64]; uint64_t generation, request_id; };
|
||||
void dm_delete_trampoline(void* arg);
|
||||
void dm_cancel_pending_history(struct UTUN_INSTANCE* inst, const char* conv);
|
||||
|
||||
/* Список бесед в JSON: [{conv_id,peer_node_id,peer_name,last_ts,out_seq,in_seq}] */
|
||||
int dm_list_conversations_json(struct UTUN_INSTANCE* inst, char* buf, size_t buf_size, size_t* out_len);
|
||||
|
||||
@@ -111,6 +116,7 @@ void dm_start_trampoline(void* arg);
|
||||
struct dm_send_req {
|
||||
struct UTUN_INSTANCE* inst;
|
||||
char conv_id[64];
|
||||
uint64_t generation; /* 0: захватить при входе в uasync, до любой фоновой работы. */
|
||||
uint32_t data_len;
|
||||
uint8_t* data; /* data_len байт (выделяется в хвосте структуры) */
|
||||
};
|
||||
@@ -127,7 +133,7 @@ enum dm_invite_result {
|
||||
};
|
||||
struct dm_invite_req {
|
||||
struct UTUN_INSTANCE* inst;
|
||||
uint64_t request_id, peer_node_id, channel_id;
|
||||
uint64_t request_id, peer_node_id, channel_id, generation;
|
||||
char source_ch_id[64]; /* общая группа для новой PM; из шапки PM может быть пустой */
|
||||
char peer_name[128];
|
||||
int cancel;
|
||||
|
||||
Reference in new issue
Block a user