Expect livekit identity not pubkey in 39004
This commit is contained in:
+7
-6
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
import {DisconnectReason, Room, RoomEvent, Track} from "livekit-client"
|
||||
import {derived, get, writable} from "svelte/store"
|
||||
import {uniqBy} from "@welshman/lib"
|
||||
import {map, removeUndefined, uniqBy} from "@welshman/lib"
|
||||
import type {TrustedEvent} from "@welshman/util"
|
||||
import {makeHttpAuth, makeHttpAuthHeader, getTags} from "@welshman/util"
|
||||
import {signer} from "@welshman/app"
|
||||
@@ -117,11 +117,12 @@ export const deriveVoiceParticipants = (url: string, h: string) =>
|
||||
} else {
|
||||
const latestEvent = $publishedParticipantList as TrustedEvent | undefined
|
||||
if (!latestEvent) return []
|
||||
const participants = getTags("participant", latestEvent.tags).map((tag: string[]) => {
|
||||
const pubkey = tag[1]
|
||||
const identity = tag[2] ?? pubkey
|
||||
return pubkey ? {pubkey, identity} : {identity}
|
||||
})
|
||||
const participants = removeUndefined(
|
||||
map(
|
||||
(tag: string[]) => (tag[1] ? participantFromLiveKitIdentity(tag[1]) : undefined),
|
||||
getTags("participant", latestEvent.tags),
|
||||
),
|
||||
)
|
||||
return uniqBy((p: VoiceParticipant) => participantKey(p), participants)
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user