show user count based on meberships not users.

Signed-off-by: Timo K <toger5@hotmail.de>
This commit is contained in:
Timo K
2025-03-06 15:40:47 +01:00
parent 68cd2032bb
commit 2b85d85e95

View File

@@ -77,6 +77,7 @@ import {
useSetting, useSetting,
} from "../settings/settings"; } from "../settings/settings";
import { useTypedEventEmitter } from "../useEvents"; import { useTypedEventEmitter } from "../useEvents";
import { CallMembership } from "matrix-js-sdk/src/matrixrtc/CallMembership.ts";
declare global { declare global {
interface Window { interface Window {
@@ -180,7 +181,9 @@ export const GroupCallView: FC<Props> = ({
// Count each member only once, regardless of how many devices they use // Count each member only once, regardless of how many devices they use
const participantCount = useMemo( const participantCount = useMemo(
() => new Set<string>(memberships.map((m) => m.sender!)).size, // TODO REVERT THIS!!!
// It is debatable if the device count is better than the user count but this debate and change should be done in a separate PR.
() => new Set<CallMembership>(memberships).size,
[memberships], [memberships],
); );