fix: remove from channel
This commit is contained in:
@@ -218,7 +218,7 @@ export default function useStreaming() {
|
|||||||
const { gid, ...rest } = data;
|
const { gid, ...rest } = data;
|
||||||
dispatch(
|
dispatch(
|
||||||
updateChannel({
|
updateChannel({
|
||||||
id: gid,
|
gid,
|
||||||
...rest
|
...rest
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
@@ -232,7 +232,7 @@ export default function useStreaming() {
|
|||||||
dispatch(
|
dispatch(
|
||||||
updateChannel({
|
updateChannel({
|
||||||
operation: "add_member",
|
operation: "add_member",
|
||||||
id: gid,
|
gid,
|
||||||
members: uids
|
members: uids
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
@@ -241,13 +241,13 @@ export default function useStreaming() {
|
|||||||
case "user_leaved_group":
|
case "user_leaved_group":
|
||||||
{
|
{
|
||||||
const { gid, uid: uids } = data;
|
const { gid, uid: uids } = data;
|
||||||
if (uids.findIndex((id) => id == loginUid) > -1) {
|
if (uids.findIndex((uid) => uid == loginUid) > -1) {
|
||||||
dispatch(removeChannel(gid));
|
dispatch(removeChannel(gid));
|
||||||
} else {
|
} else {
|
||||||
dispatch(
|
dispatch(
|
||||||
updateChannel({
|
updateChannel({
|
||||||
operation: "remove_member",
|
operation: "remove_member",
|
||||||
id: gid,
|
gid,
|
||||||
members: uids
|
members: uids
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user