append messages from free users with "sent from shellphone"

This commit is contained in:
m5r
2021-10-03 21:31:26 +02:00
parent a28d89a8c2
commit 24f1e953f6
9 changed files with 31 additions and 47 deletions

View File

@ -28,7 +28,7 @@ const fetchCallsQueue = Queue<Payload>("api/queue/fetch-calls", async ({ organiz
twilioClient.calls.list({ from: phoneNumber.number }),
twilioClient.calls.list({ to: phoneNumber.number }),
]);
const calls = [...callsSent, ...callsReceived].sort((a, b) => a.dateCreated.getTime() - b.dateCreated.getTime());
const calls = [...callsSent, ...callsReceived];
await insertCallsQueue.enqueue(
{