Skipped duplicate heartbeats should be treated as successfully received

This commit is contained in:
Alan Hamlett
2024-10-08 13:46:09 +02:00
parent 73c0892487
commit 7c7f749c71

View File

@@ -223,7 +223,7 @@ class WakaTimeCore {
if (resp[0].error) {
await this.putHeartbeatsBackInQueue(heartbeats.filter((h, i) => i === respNumber));
console.error(resp[0].error);
} else if ((resp[1] === 201 || resp[1] === 202) && resp[0].data?.id) {
} else if (resp[1] === 201 || resp[1] === 202) {
await changeExtensionStatus('allGood');
} else {
if (resp[1] !== 400) {