UBER-174: Introduce createOn every there (#3222)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2023-05-20 00:37:22 +07:00
committed by GitHub
parent 0f62a3175e
commit c0bb68be9e
50 changed files with 159 additions and 317 deletions
@@ -184,7 +184,7 @@ async function ThreadMessageDelete (tx: Tx, control: TriggerControl): Promise<Tx
comment.attachedTo,
{
replies: comments.map((comm) => (control.modelDb.getObject(comm.createBy) as EmployeeAccount).employee),
lastReply: comments.length > 0 ? Math.max(...comments.map((comm) => comm.createOn)) : undefined
lastReply: comments.length > 0 ? Math.max(...comments.map((comm) => comm.createOn ?? comm.modifiedOn)) : undefined
}
)