diff --git a/src/common/hook/useStreaming/index.ts b/src/common/hook/useStreaming/index.ts index 9d7e9fd5..56344dc5 100644 --- a/src/common/hook/useStreaming/index.ts +++ b/src/common/hook/useStreaming/index.ts @@ -218,7 +218,7 @@ export default function useStreaming() { const { gid, ...rest } = data; dispatch( updateChannel({ - id: gid, + gid, ...rest }) ); @@ -232,7 +232,7 @@ export default function useStreaming() { dispatch( updateChannel({ operation: "add_member", - id: gid, + gid, members: uids }) ); @@ -241,13 +241,13 @@ export default function useStreaming() { case "user_leaved_group": { const { gid, uid: uids } = data; - if (uids.findIndex((id) => id == loginUid) > -1) { + if (uids.findIndex((uid) => uid == loginUid) > -1) { dispatch(removeChannel(gid)); } else { dispatch( updateChannel({ operation: "remove_member", - id: gid, + gid, members: uids }) );