Fix issue with location of socket metadata

This commit is contained in:
Andrew Kingston 2023-07-05 09:02:10 +01:00
parent 8f601a2c58
commit aedd04b98a
3 changed files with 10 additions and 6 deletions

View File

@ -127,8 +127,8 @@ export const selectedAutomation = derived(automationStore, $automationStore => {
export const userSelectedResourceMap = derived(userStore, $userStore => {
let map = {}
$userStore.forEach(user => {
if (user.selectedResourceId) {
map[user.selectedResourceId] = user
if (user.builderMetadata?.selectedResourceId) {
map[user.builderMetadata?.selectedResourceId] = user
}
})
return map

View File

@ -86,8 +86,10 @@ export default class BuilderSocket extends BaseSocket {
async updateUser(socket: Socket, patch: Object) {
await super.updateUser(socket, {
builderMetadata: {
...socket.data.builderMetadata,
...patch,
},
})
}

View File

@ -71,8 +71,10 @@ export default class GridSocket extends BaseSocket {
async updateUser(socket: Socket, patch: Object) {
await super.updateUser(socket, {
gridMetadata: {
...socket.data.gridMetadata,
...patch,
},
})
}