Merge branch 'develop'

This commit is contained in:
molvqingtai 2024-10-02 23:40:32 +08:00
commit c05f5d987e

View file

@ -237,9 +237,9 @@ const RoomDomain = Remesh.domain({
impl: ({ get }, action: { type: 'create' | 'delete'; user: RoomUser }) => { impl: ({ get }, action: { type: 'create' | 'delete'; user: RoomUser }) => {
const userList = get(UserListState()) const userList = get(UserListState())
if (action.type === 'create') { if (action.type === 'create') {
return [UserListState().new(upsert(userList, action.user, 'peerId'))] return [UserListState().new(upsert(userList, action.user, 'userId'))]
} else { } else {
return [UserListState().new(userList.filter(({ peerId }) => peerId !== action.user.peerId))] return [UserListState().new(userList.filter(({ userId }) => userId !== action.user.userId))]
} }
} }
}) })