Skip to content

Commit

Permalink
Respect message ordering
Browse files Browse the repository at this point in the history
See https://spec.matrix.org/v1.11/application-service-api/#timestamp-massaging
for why this might be needed.
This removes concurrency for handleMessage calls, which is probably not
what we want.
  • Loading branch information
flying-scorpio committed Jul 24, 2024
1 parent 623241c commit 22c43db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ async function loadRcExport(entity: Entity) {

case Entity.Messages:
if (!item.tmid) {
queue.push(limit(() => handleMessage(item)))
await handleMessage(item)
}
break

case Entity.ThreadMessages:
if (item.tmid) {
queue.push(limit(() => handleMessage(item)))
await handleMessage(item)
}
break

Expand Down

0 comments on commit 22c43db

Please sign in to comment.