MCPcopy
hub / github.com/learnhouse/learnhouse / onConnect

Function onConnect

apps/collab/src/index.ts:238–247  ·  view source on GitHub ↗
({ documentName, instance }: onConnectPayload)

Source from the content-addressed store, hash-verified

236 },
237
238 async onConnect({ documentName, instance }: onConnectPayload) {
239 const boardUuid = extractBoardUuid(documentName)
240 if (!boardUuid) return
241
242 // Count existing connections for this document
243 const doc = instance.documents.get(documentName)
244 if (doc && doc.getConnectionsCount() >= MAX_BOARD_USERS) {
245 throw new Error(`Board is full (max ${MAX_BOARD_USERS} concurrent users)`)
246 }
247 },
248
249 extensions: [
250 new Database({

Callers

nothing calls this directly

Calls 2

extractBoardUuidFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected