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 Dec 11, 2024
1 parent 17f946a commit 9350c1f
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 9350c1f

Please sign in to comment.