@live-change/peer-connection-service 0.8.63 → 0.8.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/peerState.js +9 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/peer-connection-service",
3
- "version": "0.8.63",
3
+ "version": "0.8.65",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -11,5 +11,5 @@
11
11
  },
12
12
  "author": "Michał Łaszczewski <michal@emikse.com>",
13
13
  "license": "BSD-3-Clause",
14
- "gitHead": "f49f580138d6c44d9e9820197765ef982c5bab03"
14
+ "gitHead": "c239699e9aea10bb7ae0baca0ab980ff1d9f5f94"
15
15
  }
package/peerState.js CHANGED
@@ -29,7 +29,13 @@ const PeerState = definition.model({
29
29
  what: Peer
30
30
  },
31
31
  properties: {
32
- ...peerStateFields
32
+ ...peerStateFields,
33
+ sessionOrUserType: {
34
+ type: String
35
+ },
36
+ sessionOrUser: {
37
+ type: String
38
+ },
33
39
  }
34
40
  })
35
41
 
@@ -80,6 +86,8 @@ definition.action({
80
86
  return hasRole
81
87
  },
82
88
  async execute(props, { client, service }, emit) {
89
+ const [sessionOrUserType, sessionOrUser] =
90
+ client.user ? ['user_User', client.user] : ['session_Session', client.session]
83
91
  let data = { }
84
92
  for(const key in peerStateFields) {
85
93
  data[key] = props[key]