Refactor target message for delivery receipt processing

This commit is contained in:
trevor-signal 2023-12-08 15:35:31 -05:00 committed by GitHub
parent e724f36b79
commit c2b1d76e6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 82 additions and 40 deletions

View file

@ -39,6 +39,11 @@ export const parseMessageSendStatus = makeEnumParser(
SendStatus.Pending
);
export const UNDELIVERED_SEND_STATUSES = [
SendStatus.Pending,
SendStatus.Failed,
];
const STATUS_NUMBERS: Record<SendStatus, number> = {
[SendStatus.Failed]: 0,
[SendStatus.Pending]: 1,