Build a websocket topics framework

This commit is contained in:
Alex Gleason
2023-05-20 19:39:05 -05:00
parent 02160f8c9e
commit 3ffad1df29
6 changed files with 116 additions and 21 deletions

View File

@@ -12,7 +12,8 @@ const setAuth: AppMiddleware = async (c, next) => {
const match = authHeader?.match(BEARER_REGEX);
if (match) {
const [_, _token, bech32, _sessionId] = match;
const [_, _token, bech32, session] = match;
c.set('session', session);
try {
const decoded = nip19.decode(bech32!);