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:
evgeny committed 2026-10-18 02:04:05 +02:00
1 parent 97710b609f
commit be295f768c
38 files changed
+1005 -126

No files matched your search

@@ -6,6 +6,20 @@ import java.nio.ByteBuffer
import java.nio.ByteOrder
class MemberAvatarTest {
@Test fun snapshotStringsStopAtFirstNullBeforeDirtyPadding() {
for (name in listOf("", "0x06B9", "Без имени", "x".repeat(63))) {
val bytes = ByteArray(MEMBER_WIRE_SIZE)
bytes.fill(0xff.toByte(), 15, 79)
val encoded = name.toByteArray(Charsets.UTF_8)
encoded.copyInto(bytes, 15); bytes[15 + encoded.size] = 0
ByteBuffer.wrap(bytes).order(ByteOrder.LITTLE_ENDIAN).putLong(79, 456)
bytes.fill(0xff.toByte(), 87, 157); bytes[87] = 0; bytes[157] = 1
val member = requireNotNull(parseMemberWire(bytes)).toChatMember()
assertEquals(name, member.name)
assertEquals(456L, member.avatarServer); assertEquals("", member.avatarFile); assertTrue(member.storageRole)
}
}
@Test fun sharedSnapshotKeepsAvatarAndSignedStorageRole() {
val bytes = ByteArray(158)
val b = ByteBuffer.wrap(bytes).order(ByteOrder.LITTLE_ENDIAN)