Фикс бага с уникальными индексами сообщений
This commit is contained in:
@@ -70,8 +70,8 @@ export function useDialogFiber() {
|
||||
}
|
||||
await runQuery(
|
||||
"INSERT INTO accounts_sync_times (account, last_sync) VALUES (?, ?) " +
|
||||
"ON CONFLICT(account) DO UPDATE SET last_sync = ?",
|
||||
[publicKey, timestamp, timestamp]
|
||||
"ON CONFLICT(account) DO UPDATE SET last_sync = ? WHERE account = ?",
|
||||
[publicKey, timestamp, timestamp, publicKey]
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -54,8 +54,8 @@ export function useSynchronize() {
|
||||
console.info("Batch finished");
|
||||
await runQuery(
|
||||
"INSERT INTO accounts_sync_times (account, last_sync) VALUES (?, ?) " +
|
||||
"ON CONFLICT(account) DO UPDATE SET last_sync = ?",
|
||||
[publicKey, packet.getTimestamp(), packet.getTimestamp()]
|
||||
"ON CONFLICT(account) DO UPDATE SET last_sync = ? WHERE account = ?",
|
||||
[publicKey, packet.getTimestamp(), packet.getTimestamp(), publicKey]
|
||||
);
|
||||
console.info("Batch complete", publicKey, packet.getTimestamp());
|
||||
trySync();
|
||||
|
||||
Reference in New Issue
Block a user