File tree Expand file tree Collapse file tree
infrastructure/evault-core/src/core/db Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -657,17 +657,13 @@ export class DbService {
657657 }
658658 }
659659
660- // Delete envelopes that are no longer in the payload
661- const newOntologies = new Set ( Object . keys ( meta . payload ) ) ;
662- const idsToDelete = workingEnvelopes
663- . filter ( ( e ) => ! newOntologies . has ( e . ontology ) )
664- . map ( ( e ) => e . id ) ;
665- if ( idsToDelete . length > 0 ) {
666- await tx . run (
667- `MATCH (e:Envelope) WHERE e.id IN $ids DETACH DELETE e` ,
668- { ids : idsToDelete } ,
669- ) ;
670- }
660+ // PATCH semantics: fields absent from the new payload are
661+ // left alone. Callers (notably web3-adapter) project partial
662+ // platform updates through toGlobal — if the platform only
663+ // touched one column, only one ontology reaches us, and
664+ // deleting "stale" envelopes here would clobber every other
665+ // field on the meta-envelope (e.g. wiping participantIds when
666+ // a read-receipt update arrives).
671667
672668 return {
673669 metaEnvelope : {
You can’t perform that action at this time.
0 commit comments