mirror of
https://github.com/docmost/docmost.git
synced 2025-11-13 22:11:16 +10:00
update collaboration
This commit is contained in:
@ -9,7 +9,7 @@
|
|||||||
"preview": "vite preview --port 3000"
|
"preview": "vite preview --port 3000"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@hocuspocus/provider": "^2.7.0",
|
"@hocuspocus/provider": "^2.7.1",
|
||||||
"@mantine/core": "^7.1.5",
|
"@mantine/core": "^7.1.5",
|
||||||
"@mantine/form": "^7.1.5",
|
"@mantine/form": "^7.1.5",
|
||||||
"@mantine/hooks": "^7.1.5",
|
"@mantine/hooks": "^7.1.5",
|
||||||
|
|||||||
@ -29,8 +29,8 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@aws-sdk/client-s3": "^3.431.0",
|
"@aws-sdk/client-s3": "^3.431.0",
|
||||||
"@aws-sdk/s3-request-presigner": "^3.431.0",
|
"@aws-sdk/s3-request-presigner": "^3.431.0",
|
||||||
"@hocuspocus/server": "^2.7.0",
|
"@hocuspocus/server": "^2.7.1",
|
||||||
"@hocuspocus/transformer": "^2.7.0",
|
"@hocuspocus/transformer": "^2.7.1",
|
||||||
"@nestjs/common": "^10.2.7",
|
"@nestjs/common": "^10.2.7",
|
||||||
"@nestjs/config": "^3.1.1",
|
"@nestjs/config": "^3.1.1",
|
||||||
"@nestjs/core": "^10.2.7",
|
"@nestjs/core": "^10.2.7",
|
||||||
|
|||||||
@ -30,10 +30,14 @@ export class CollabWsAdapter {
|
|||||||
return this.wss;
|
return this.wss;
|
||||||
}
|
}
|
||||||
|
|
||||||
public close() {
|
public destroy() {
|
||||||
this.wss.clients.forEach((client) => {
|
try {
|
||||||
client.terminate();
|
this.wss.clients.forEach((client) => {
|
||||||
});
|
client.terminate();
|
||||||
this.wss.close();
|
});
|
||||||
|
this.wss.close();
|
||||||
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,7 +22,7 @@ export class CollaborationGateway {
|
|||||||
this.hocuspocus.handleConnection(client, request);
|
this.hocuspocus.handleConnection(client, request);
|
||||||
}
|
}
|
||||||
|
|
||||||
handleDestroy() {
|
destroy() {
|
||||||
this.hocuspocus.destroy();
|
this.hocuspocus.destroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,7 +39,7 @@ export class CollaborationModule implements OnModuleInit, OnModuleDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onModuleDestroy(): any {
|
onModuleDestroy(): any {
|
||||||
this.collaborationGateway.handleDestroy();
|
this.collaborationGateway.destroy();
|
||||||
this.collabWsAdapter.close();
|
this.collabWsAdapter.destroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user