Address remaining PR comments

This commit is contained in:
mplorentz
2026-03-05 16:46:29 -05:00
committed by hodlbod
parent 79728f68a4
commit 6fcda91764
5 changed files with 97 additions and 106 deletions
+5 -4
View File
@@ -103,6 +103,7 @@ import {
getListTags,
getPubkeyTagValues,
getRelayTagValues,
getTag,
getTagValues,
isRelayUrl,
normalizeRelayUrl,
@@ -668,7 +669,7 @@ export const deriveRoomsWithLivekit = (url: string) =>
derived(roomsById, $roomsById => {
const set = new Set<string>()
for (const room of $roomsById.values()) {
if (room.url === url && room.event?.tags?.some(t => t[0] === "livekit")) {
if (room.url === url && getTag("livekit", room.event?.tags ?? [])) {
set.add(room.h)
}
}
@@ -679,7 +680,7 @@ export const deriveRoomsNoText = (url: string) =>
derived(roomsById, $roomsById => {
const set = new Set<string>()
for (const room of $roomsById.values()) {
if (room.url === url && room.event?.tags?.some(t => t[0] === "no-text")) {
if (room.url === url && getTag("no-text", room.event?.tags ?? [])) {
set.add(room.h)
}
}
@@ -688,12 +689,12 @@ export const deriveRoomsNoText = (url: string) =>
export const roomHasLivekit = (url: string, h: string) => {
const room = getRoom(makeRoomId(url, h))
return room?.event?.tags?.some(t => t[0] === "livekit") ?? false
return !!getTag("livekit", room?.event?.tags ?? [])
}
export const roomIsNoText = (url: string, h: string) => {
const room = getRoom(makeRoomId(url, h))
return room?.event?.tags?.some(t => t[0] === "no-text") ?? false
return !!getTag("no-text", room?.event?.tags ?? [])
}
// User space/room lists