Route moderation cursor and receipts through typed operations
This commit is contained in:
parent
ea9e1198aa
commit
82f35b22a0
7 changed files with 76 additions and 223 deletions
|
|
@ -204,6 +204,10 @@ function applyLegacyCompatibilityOperation(
|
|||
}
|
||||
case "record_delivery_receipt":
|
||||
upsertLegacyRuntimeArray(runtime, "recent_delivery_receipts", operation.receipt, "receiptKey");
|
||||
runtime.recent_delivery_receipts = readObjectArray(runtime.recent_delivery_receipts)
|
||||
.filter((entry) => readString(entry, "sentAt"))
|
||||
.sort((left, right) => (readString(left, "sentAt") ?? "").localeCompare(readString(right, "sentAt") ?? ""))
|
||||
.slice(-24);
|
||||
closeLegacyOpenCaseForReceipt(runtime, operation.receipt);
|
||||
return true;
|
||||
case "queue_candidate_intervention":
|
||||
|
|
|
|||
Loading…
Reference in a new issue