MCPcopy Create free account
hub / github.com/OpenAnonymity/oa-chat / getSession

Method getSession

chat/db.js:316–325  ·  view source on GitHub ↗
(sessionId)

Source from the content-addressed store, hash-verified

314 });
315 }
316
317 async getSession(sessionId) {
318 return new Promise((resolve, reject) => {
319 const transaction = this.db.transaction(['sessions'], 'readonly');
320 const store = transaction.objectStore('sessions');
321 const request = store.get(sessionId);
322
323 request.onsuccess = () => resolve(request.result || null);
324 request.onerror = () => reject(request.error);
325 });
326 }
327
328 async getAllSessions() {

Callers 2

checkForUrlSessionMethod · 0.80
ensureSessionLoadedMethod · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected