Use TrustedEvent

This commit is contained in:
mplorentz
2026-03-05 10:12:43 -05:00
parent c7faac675d
commit 21821ddef7
+3 -3
View File
@@ -1,8 +1,8 @@
<script lang="ts">
import {get} from "svelte/store"
import type {Snippet} from "svelte"
import {assoc, append, nth, type Maybe, uniqBy} from "@welshman/lib"
import type {RoomMeta} from "@welshman/util"
import {assoc, append, nth, uniqBy} from "@welshman/lib"
import type {RoomMeta, TrustedEvent} from "@welshman/util"
import {getTag, makeRoomMeta} from "@welshman/util"
import {waitForThunkError, createRoom, editRoom, joinRoom} from "@welshman/app"
import StickerSmileSquare from "@assets/icons/sticker-smile-square.svg?dataurl"
@@ -21,7 +21,7 @@
type RoomMode = "text" | "voice" | "both"
const getRoomModeFromEvent = (event: Maybe<{tags: Maybe<string[][]>}>): RoomMode => {
const getRoomModeFromEvent = (event?: TrustedEvent): RoomMode => {
const tags = event?.tags ?? []
const hasLivekit = !!getTag("livekit", tags)
const hasNoText = !!getTag("no-text", tags)