-
Notifications
You must be signed in to change notification settings - Fork 457
Open
Description
I've read the docs and found that I can pass some info to server by adding options.source in submitOp(), but how can a client get source from server?
My code looks like:
`
// client.ts
doc.submitSource = true;
doc.on("op batch", async (op, source) => {
console.log(source);
}
// opSubmit.ts
doc.submitSource = true;
let op: { p: [string, number]; sd?: string; si?: string }[] = [];
op.push({ p: ["content", offset], si: insertPosition});
doc.submitOp(op, {source: userId}); // userId is defined as string type, and I'm pretty sure I've passed a not-empty string value to it
`
However, the source output in client.ts turns out to be false(a boolean value). Are there any possible solutions I may try to make the codes work as I've expected?
Metadata
Metadata
Assignees
Labels
No labels