corebasic 1.0.91 → 1.0.92

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/libs/features.js +3 -1
  2. package/package.json +1 -1
package/libs/features.js CHANGED
@@ -35,6 +35,7 @@ export const send = async (feature, params, payload, headers) => {
35
35
  return (await axios[method](`${service}${url}`, { data: payload, headers: {jwt: headers.jwt}, timeout: 1000 })).data
36
36
  }
37
37
 
38
+ let appids = {}
38
39
  async function announce() {
39
40
  let exp_features = {}
40
41
  for (let [key, {api}] of Object.entries(features))
@@ -42,7 +43,8 @@ async function announce() {
42
43
 
43
44
  await Messaging.subscribe("SLYP_FEATURES_LIST", async (message, channel) => {
44
45
  let msg = JSON.parse(message)
45
- if (msg.uid !== appId) {
46
+ if (msg.uid !== appId && !appids[msg.uid]) {
47
+ appids[msg.uid] = true
46
48
  SLYP_FEATURES_LIST = {...SLYP_FEATURES_LIST, ...msg}
47
49
  delete SLYP_FEATURES_LIST.uid
48
50
  await Messaging.produce("SLYP_FEATURES_LIST", JSON.stringify({...exp_features, uid: appId }))
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "corebasic",
3
3
  "type": "module",
4
- "version": "1.0.91",
4
+ "version": "1.0.92",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "scripts": {