Move livekit auth to relay

This commit is contained in:
mplorentz
2026-03-02 17:00:19 -05:00
committed by hodlbod
parent 3049efe889
commit 52f2f31ce6
8 changed files with 386 additions and 82 deletions
+10
View File
@@ -663,6 +663,16 @@ export const displayRoom = (url: string, h: string) => getRoom(makeRoomId(url, h
export const roomComparator = (url: string) => (h: string) => displayRoom(url, h).toLowerCase()
export const roomHasLivekit = (url: string, h: string) => {
const room = getRoom(makeRoomId(url, h))
return room?.event?.tags?.some(t => t[0] === "livekit") ?? false
}
export const roomIsNoText = (url: string, h: string) => {
const room = getRoom(makeRoomId(url, h))
return room?.event?.tags?.some(t => t[0] === "no-text") ?? false
}
// User space/room lists
export const groupListsByPubkey = deriveItemsByKey({
+2 -2
View File
@@ -55,7 +55,7 @@ import {
loadFeedsForPubkey,
} from "@app/core/state"
import {hasBlossomSupport} from "@app/core/commands"
import {LIVE_ACTIVITY, ROOM_PRESENCE} from "@app/voice"
import {ROOM_PRESENCE} from "@app/voice"
// Utils
@@ -320,7 +320,7 @@ const syncSpace = (url: string, rooms: string[]) => {
pullAndListen({
url,
signal: controller.signal,
filters: [{kinds: [LIVE_ACTIVITY, ROOM_PRESENCE]}],
filters: [{kinds: [ROOM_PRESENCE]}],
})
return () => controller.abort()