Релиз 1.2.6: sync-статусы, emoji-подсказки и UI-фиксы
Some checks failed
Android Kernel Build / build (push) Failing after 27m7s
Some checks failed
Android Kernel Build / build (push) Failing after 27m7s
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user