Move livekit auth to relay
This commit is contained in:
@@ -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({
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user