diff --git a/server/middleware/src/modified.ts b/server/middleware/src/modified.ts index 40295ef5eb..162022271a 100644 --- a/server/middleware/src/modified.ts +++ b/server/middleware/src/modified.ts @@ -13,7 +13,7 @@ // limitations under the License. // -import core, { Doc, ServerStorage, Timestamp, Tx, TxCreateDoc } from '@anticrm/core' +import core, { AttachedDoc, Doc, ServerStorage, Timestamp, Tx, TxCollectionCUD, TxCreateDoc } from '@anticrm/core' import { Middleware, SessionContext, TxMiddlewareResult } from '@anticrm/server-core' import { BaseMiddleware } from './base' @@ -37,6 +37,10 @@ export class ModifiedMiddleware extends BaseMiddleware implements Middleware { createTx.attributes.createOn = tx.modifiedOn } } + if (this.storage.hierarchy.isDerived(tx._class, core.class.TxCollectionCUD)) { + const coltx = tx as TxCollectionCUD + coltx.tx.modifiedOn = tx.modifiedOn + } const res = await this.provideTx(ctx, tx) return [res[0], res[1], res[2]] }