Manual pin resolves by userId only, so multi-device users pin an arbitrary device #30

Closed
opened 2026-09-12 02:13:13 -04:00 by jared · 0 comments
Owner

Severity: low · Type: bug · Confidence: high

Location: src/lotus/lotusSpotlight.ts:56-64,79-82, src/lotus/lotusCallState.ts:16-24

Problem

overrideSpotlight$ resolves the pin with mediaItems.find(m => m.userId === manualUserId). A participant joined from two devices has two UserMediaViewModels with the same userId, and find deterministically takes the first in userMedia$ order — which may be the idle/muted device. This is avoidable: io.lotus.call_state already sends the stable per-device media id (${userId}:${deviceId}) to the host, so the host has everything needed to pin precisely, but focus_participant's payload only carries userId.

How to trigger

join a call from phone and desktop with the same account, have another user pin you.

Suggested fix

accept an optional id (media id) in the focus_participant payload and prefer it over the userId match; fall back to the currently-speaking device when only a userId is given.


Filed from the September 2026 audit (branch lotus).

**Severity:** low · **Type:** bug · **Confidence:** high **Location:** `src/lotus/lotusSpotlight.ts:56-64,79-82`, `src/lotus/lotusCallState.ts:16-24` ### Problem `overrideSpotlight$` resolves the pin with `mediaItems.find(m => m.userId === manualUserId)`. A participant joined from two devices has two `UserMediaViewModel`s with the same `userId`, and `find` deterministically takes the first in `userMedia$` order — which may be the idle/muted device. This is avoidable: `io.lotus.call_state` already sends the stable per-device media `id` (`${userId}:${deviceId}`) to the host, so the host has everything needed to pin precisely, but `focus_participant`'s payload only carries `userId`. ### How to trigger join a call from phone and desktop with the same account, have another user pin you. ### Suggested fix accept an optional `id` (media id) in the `focus_participant` payload and prefer it over the `userId` match; fall back to the currently-speaking device when only a userId is given. --- _Filed from the September 2026 audit (branch `lotus`)._
jared added this to the EC fork audit 2026-09 · Medium & Low milestone 2026-09-12 02:13:13 -04:00
jared added the bugpriority: lowarea: widget-actions labels 2026-09-12 02:13:13 -04:00
jared self-assigned this 2026-09-12 02:13:13 -04:00
jared closed this issue 2026-09-13 01:22:50 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/element-call#30