Skip to content

Commit 967e671

Browse files
committed
fix: fix action repush and will display repeated user
1 parent 6ec4c0a commit 967e671

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

pnpm-lock.yaml

Lines changed: 14 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/plugins/com.msgbyte.livekit/web/plugins/com.msgbyte.livekit/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
"@livekit/components-react": "^1.0.8",
1313
"@livekit/components-styles": "^1.0.4",
1414
"livekit-client": "^1.12.1",
15+
"lodash": "^4.17.21",
1516
"zustand": "4.3.6"
1617
},
1718
"devDependencies": {
19+
"@types/lodash": "^4.14.196",
1820
"@types/styled-components": "^5.1.26",
1921
"react": "18.2.0",
2022
"styled-components": "^5.3.6"

server/plugins/com.msgbyte.livekit/web/plugins/com.msgbyte.livekit/src/group/LivekitPanelBadge.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { useGlobalSocketEvent, useWatch } from '@capital/common';
22
import { Avatar, Tooltip, UserAvatar, UserName } from '@capital/component';
33
import React, { useEffect, useState } from 'react';
44
import { useRoomParticipants } from '../utils/useRoomParticipants';
5+
import _uniqBy from 'lodash/uniqBy';
56

67
export const LivekitPanelBadge: React.FC<{
78
groupId: string;
@@ -32,7 +33,9 @@ export const LivekitPanelBadge: React.FC<{
3233
payload.panelId === props.panelId &&
3334
payload.participant
3435
) {
35-
setDisplayParticipants((state) => [...state, payload.participant]);
36+
setDisplayParticipants((state) =>
37+
_uniqBy([...state, payload.participant], 'sid')
38+
);
3639
}
3740
}
3841
);

0 commit comments

Comments
 (0)