Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@BrianHung
Copy link

@BrianHung BrianHung commented Sep 24, 2024

Allows for specified id in repo.create.

One thing: in the conversation about pre-defined ids and about loading from binary, does automerge.from clone the document that is passed in?

I'm wondering if this allows for the following:

const copy = {
  content: new Uint8Array([133, 111, 74, 131, ...]),
  id: ...
}

const doc = am.load(copy.content)
const handle = repo.create(doc, copy.id)

so that the initial value in repo.create shares ancestry with the binary that is passed in.

@adrianduke
Copy link

Nudge for this functionality! I was just about to write this PR before I saw this... Can provide a hand if needed.

@BrianHung
Copy link
Author

Feel free to jump into this discord thread: https://discord.com/channels/1200006940210757672/1287965416689238047/1288223592936374323 The main blocker is how should we handle conflicting ids.

@pvh pvh force-pushed the main branch 3 times, most recently from b5b124c to 12ae986 Compare April 3, 2025 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants