Skip to content
Source
Sign inSign up
pingdotgg/t3code

perf(server): sending a message no longer rereads the thread from the database after settle, snooze or title updates #28301

Mergedonly21mil(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/28301/headmerged by maria-rcks View on GitHub

Showing 2 changed files with 20 additions and 7 deletions.

x
0 of 2 viewed, 2 left
6 additions and 6 deletionsapps/server/src/orchestration-v2/Orchestrator.tsModified
View file
@@ -5395,7 +5395,7 @@
: now,
updatedAt: now,
- yield* emit(
+ const event = yield* emit(
events,
command,
@@ -5405,7 +5405,7 @@
occurredAt: now,
payload: thread,
- projection = yield* getProjectionWithPendingEvents(command.threadId, events);
+ projection = applyToProjection(projection, event);
// Background wakes and delegated completions continue work the user already snoozed, so
// only a message someone actually sent ends the snooze.
@@ -5419,7 +5419,7 @@
snoozedAt: null,
updatedAt: now,
- yield* emit(
+ const event = yield* emit(
events,
command,