Релиз 1.2.6: sync-статусы, emoji-подсказки и UI-фиксы
Some checks failed
Android Kernel Build / build (push) Failing after 27m7s

This commit is contained in:
2026-03-20 21:56:52 +05:00
parent b2558653b7
commit c929685e04
8 changed files with 356 additions and 27 deletions

View File

@@ -482,6 +482,35 @@ interface MessageDao {
)
suspend fun markExpiredWaitingAsError(account: String, maxTimestamp: Long): Int
/**
* Desktop parity recovery:
* own direct messages synced from another device are stored with chacha_key "sync:*"
* and should always be DELIVERED (never WAITING/ERROR).
*/
@Query(
"""
UPDATE messages
SET delivered = 1
WHERE account = :account
AND from_me = 1
AND delivered != 1
AND chacha_key LIKE 'sync:%'
"""
)
suspend fun markSyncedOwnMessagesAsDelivered(account: String): Int
@Query(
"""
SELECT DISTINCT to_public_key
FROM messages
WHERE account = :account
AND from_me = 1
AND delivered != 1
AND chacha_key LIKE 'sync:%'
"""
)
suspend fun getSyncedOwnMessageOpponentsWithNonDeliveredStatus(account: String): List<String>
/**
* Update delivery status AND timestamp on delivery confirmation.
* Desktop parity: useDialogFiber.ts sets timestamp = Date.now() on PacketDelivery.