MCPcopy Index your code
hub / github.com/hackmdio/codimd / parseNoteIdFromSocketAsync

Function parseNoteIdFromSocketAsync

lib/realtime/realtime.js:365–382  ·  view source on GitHub ↗
(socket)

Source from the content-addressed store, hash-verified

363}
364
365async function parseNoteIdFromSocketAsync (socket) {
366 const noteId = extractNoteIdFromSocket(socket)
367 if (!noteId) {
368 return null
369 }
370
371 return new Promise((resolve, reject) => {
372 models.Note.parseNoteId(noteId, function (err, id) {
373 if (err) {
374 reject(err)
375 }
376 if (!id) {
377 resolve(null)
378 }
379 resolve(id)
380 })
381 })
382}
383
384// TODO: test it
385function emitOnlineUsers (socket) {

Callers

nothing calls this directly

Calls 1

extractNoteIdFromSocketFunction · 0.85

Tested by

no test coverage detected