Use TrustedEvent
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user