Skip to content

Commit

Permalink
feat: Prevent local PouchDB modification to be replicated to remote DB
Browse files Browse the repository at this point in the history
For now we don't want to replicate local changes into remote PouchDB as
we first want to ensure everything works as expected locally before
activating two-way replication in the future
  • Loading branch information
Ldoppea committed Sep 25, 2024
1 parent fa2d727 commit 749ef40
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/pouchdb/getLinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,17 @@ export const getLinks = (): CozyLink[] => {
doctypes: offlineDoctypes,
initialSync: true,
platform: platformReactNative,
ignoreWarmup: true
ignoreWarmup: true,
doctypesReplicationOptions: Object.fromEntries(
offlineDoctypes.map(doctype => {
return [
doctype,
{
strategy: 'fromRemote'
}
]
})
)
}

const stackLink = new StackLink({
Expand Down

0 comments on commit 749ef40

Please sign in to comment.