MCPcopy Create free account
hub / github.com/apitable/apitable / leaveRoom

Method leaveRoom

packages/core/src/sync/room.ts:407–420  ·  view source on GitHub ↗

* leave room * 1. Remove long chain message monitoring * 2. Clear data sending status monitoring timer

()

Source from the content-addressed store, hash-verified

405 * 2. Clear data sending status monitoring timer
406 */
407 async leaveRoom() {
408 this.setConnected(false);
409 /**
410 * After switching the space, the socket of the previous space is closed, so the event of leave_room will not be triggered, so
411 * You can check the connection status of the item socket here
412 */
413 if (this.socket.connected) {
414 await this.unwatch();
415 } else {
416 console.log("socket has been closed, room needn't leave again");
417 }
418 this.clearSendingWatcher();
419 return this.collaEngineMap;
420 }
421
422 /**
423 * @description supports a single Resource to exit the current collaborative Room without destroying the current Room

Callers

nothing calls this directly

Calls 4

setConnectedMethod · 0.95
unwatchMethod · 0.95
clearSendingWatcherMethod · 0.95
logMethod · 0.45

Tested by

no test coverage detected