This diff introduces a shared interface on SQLiteAPI so the JS code in lib can use this API on both platforms.
Depends on D13030
Paths
| Differential D13031 Authored by kamil on Aug 8 2024, 5:07 AM.
Details Summary This diff introduces a shared interface on SQLiteAPI so the JS code in lib can use this API on both platforms. Depends on D13030 Test Plan Tested in D13032 Additionally, run this code: const deviceID = 'deviceID'; await processDBStoreOperations({ outboundP2PMessages: [ { messageID: 'reset-1', deviceID, userID: 'user-1', timestamp: '1', plaintext: 'decrypted-1', ciphertext: 'encrypted-1', status: 'encrypted', supportsAutoRetry: true, }, { messageID: 'reset-2', deviceID, userID: 'user-1', timestamp: '1', plaintext: 'decrypted-1', ciphertext: 'encrypted-1', status: 'sent', supportsAutoRetry: false, }, { messageID: 'reset-3', deviceID, userID: 'user-1', timestamp: '3', plaintext: 'decrypted-1', ciphertext: 'encrypted-1', status: 'encrypted', supportsAutoRetry: false, }, ], }); const before = await sqliteAPI.getAllOutboundP2PMessages(); console.log(before.filter(msg => msg.deviceID === deviceID)); const ids = await sqliteAPI.resetOutboundP2PMessagesForDevice(deviceID); console.log(ids); const after = await sqliteAPI.getAllOutboundP2PMessages(); console.log(after.filter(msg => msg.deviceID === deviceID));
Diff Detail
Event Timelinekamil held this revision as a draft. Herald added a subscriber: ashoat. · View Herald TranscriptAug 8 2024, 5:07 AM2024-08-08 05:07:58 (UTC-7) kamil added a child revision: D13032: [lib] resend messages after race condition.Aug 8 2024, 5:27 AM2024-08-08 05:27:53 (UTC-7) Harbormaster failed remote builds in B31010: Diff 43259!Aug 8 2024, 5:30 AM2024-08-08 05:30:41 (UTC-7) This revision is now accepted and ready to land.Aug 12 2024, 1:18 AM2024-08-12 01:18:58 (UTC-7) kamil edited the test plan for this revision. (Show Details)Aug 13 2024, 4:03 AM2024-08-13 04:03:43 (UTC-7) Harbormaster completed remote builds in B31010: Diff 43259.Aug 13 2024, 4:06 AM2024-08-13 04:06:29 (UTC-7) Closed by commit rCOMMd5e299a6a2fb: [lib] introduce resetting Outbound P2P Messages to `SQLiteAPI` (authored by kamil). · Explain WhyAug 13 2024, 4:10 AM2024-08-13 04:10:43 (UTC-7) This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 43331 lib/types/sqlite-types.js
lib/utils/__mocks__/config.js
native/database/sqlite-api.js
web/database/sqlite-api.js
|