mirror of
https://github.com/mattermost/focalboard.git
synced 2025-01-23 18:34:02 +02:00
fix issue with deleted members not updated via websocket (#3743)
This commit is contained in:
parent
62ffa9c39a
commit
40045d9f7b
@ -71,17 +71,17 @@ export const updateMembersEnsuringBoardsAndUsers = createAsyncThunk(
|
||||
// ensure the users for the new memberships get loaded
|
||||
const boardUsers = thunkAPI.getState().users.boardUsers
|
||||
members.forEach(async (m) => {
|
||||
const deleted = !m.schemeAdmin && !m.schemeEditor && !m.schemeViewer && !m.schemeCommenter
|
||||
if (deleted) {
|
||||
thunkAPI.dispatch(removeBoardUsersById([m.userId]))
|
||||
return
|
||||
}
|
||||
if (boardUsers[m.userId]) {
|
||||
return
|
||||
}
|
||||
const user = await client.getUser(m.userId)
|
||||
if (user) {
|
||||
const deleted = !m.schemeAdmin && !m.schemeEditor && !m.schemeViewer && !m.schemeCommenter
|
||||
if (deleted) {
|
||||
thunkAPI.dispatch(removeBoardUsersById([user.id]))
|
||||
} else {
|
||||
thunkAPI.dispatch(addBoardUsers([user]))
|
||||
}
|
||||
thunkAPI.dispatch(addBoardUsers([user]))
|
||||
}
|
||||
})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user