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
+10
-1
@@ -15,6 +15,7 @@
|
||||
#include "../src/chat/invite_link.h"
|
||||
#include "../src/dm/dm_core.h"
|
||||
#include "../src/dm/dm_crypto.h"
|
||||
#include "../src/dm/dm_history.h"
|
||||
#include "../src/routing_layer/topo_node_sqlite.h"
|
||||
#include "../src/routing_layer/topo_group.h"
|
||||
#include "../src/transport_layer/secure_channel.h"
|
||||
@@ -51,7 +52,7 @@ static void drop_history(struct ETCP_CONN* conn, struct ll_entry* entry) {
|
||||
}
|
||||
|
||||
static void event(struct UTUN_INSTANCE* inst, int type, const uint8_t* data, int len) {
|
||||
if (type == CHAT_EVT_DM_INVITE_RESULT && len == 28) {
|
||||
if (type == CHAT_EVT_DM_INVITE_RESULT && len == 36) {
|
||||
uint64_t id, peer, conv; int32_t result;
|
||||
memcpy(&id, data, 8); memcpy(&result, data + 8, 4);
|
||||
memcpy(&peer, data + 12, 8); memcpy(&conv, data + 20, 8);
|
||||
@@ -191,6 +192,14 @@ int main(void) {
|
||||
CHECK(wait_result(ua, 2, DM_INVITE_BUSY), "busy request retains first operation");
|
||||
request(1, target, source_id, 1);
|
||||
CHECK(wait_result(ua, 1, DM_INVITE_CANCELLED) && !message_count(), "cancel before ACK sends nothing");
|
||||
request(7, target, source_id, 0);
|
||||
CHECK(!calls[7], "invite waits for ACK before delete");
|
||||
char deleted_conv[64];
|
||||
snprintf(deleted_conv, sizeof(deleted_conv), "%llu", (unsigned long long)dm_derive_conv_id(nodes[0]->node_id, nodes[1]->node_id));
|
||||
CHECK(!dm_history_delete(nodes[0], deleted_conv, dm_history_generation(nodes[0], deleted_conv)), "delete with pending invitation");
|
||||
CHECK(wait_result(ua, 7, DM_INVITE_CANCELLED) && !message_count(), "delete cancels invitation without publishing PM");
|
||||
CHECK(!dm_start(nodes[0], nodes[1]->node_id, nodes[1]->my_keys.public_key, nodes[1]->my_ed25519_pubkey, "B", source_id),
|
||||
"explicit start reopens PM after deletion");
|
||||
request(3, 0, source_id, 0);
|
||||
CHECK(wait_result(ua, 3, DM_INVITE_BUILD_ERROR) && !message_count(), "invalid group sends nothing");
|
||||
|
||||
|
||||
Reference in new issue
Block a user