feat: remove session realtime

This commit is contained in:
Tristan Yang
2023-03-17 21:00:17 +08:00
parent f11c758938
commit 5bf4baabd3
4 changed files with 31 additions and 6 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ const userMsgSlice = createSlice({
}
}
},
removeUserSession(state, action) {
removeUserSession(state, action: PayloadAction<number | number[]>) {
const ids = Array.isArray(action.payload) ? action.payload : [action.payload];
state.ids = state.ids.filter((id) => ids.findIndex((i) => i == id) == -1);
}