Fix missing idempotency key

This commit is contained in:
Lim Chee Aun 2024-04-13 17:07:28 +08:00
parent 2faf9b4c20
commit 6f22ec3842

View file

@ -988,7 +988,11 @@ function Compose({
} else { } else {
try { try {
newStatus = await masto.v1.statuses.create(params, { newStatus = await masto.v1.statuses.create(params, {
idempotencyKey: UID.current, requestInit: {
headers: {
'Idempotency-Key': UID.current,
},
},
}); });
} catch (_) { } catch (_) {
// If idempotency key fails, try again without it // If idempotency key fails, try again without it