mirror of
https://github.com/outline/outline.git
synced 2026-11-27 07:58:51 +03:00
stash
This commit is contained in:
1 parent
c8d3d26044
commit
abeccb8a4c
1 file changed
+5
-7
@@ -30,14 +30,12 @@ export default class MultiplayerExtension extends Extension {
|
||||
});
|
||||
|
||||
provider.on("sync", () => {
|
||||
doc.once("afterTransaction", (tr) => {
|
||||
if (tr.local) {
|
||||
const clientIds = Array.from(doc.store.clients.keys());
|
||||
doc.once("update", () => {
|
||||
const clientIds = Array.from(doc.store.clients.keys());
|
||||
|
||||
if (!clientIds.includes(doc.clientID)) {
|
||||
const permanentUserData = new Y.PermanentUserData(doc);
|
||||
permanentUserData.setUserMapping(doc, doc.clientID, user.id);
|
||||
}
|
||||
if (!clientIds.includes(doc.clientID)) {
|
||||
const permanentUserData = new Y.PermanentUserData(doc);
|
||||
permanentUserData.setUserMapping(doc, doc.clientID, user.id);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user