@whereby.com/core 1.15.3 → 1.16.0

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.
package/dist/index.cjs CHANGED
@@ -1226,7 +1226,19 @@ const createReactor = (selectors, callback) => {
1226
1226
  });
1227
1227
  };
1228
1228
 
1229
- const coreVersion = "1.15.3";
1229
+ const coreVersion = "1.16.0";
1230
+
1231
+ function decodeRoomName(roomName) {
1232
+ if (!roomName) {
1233
+ return null;
1234
+ }
1235
+ try {
1236
+ return decodeURIComponent(roomName);
1237
+ }
1238
+ catch (_a) {
1239
+ return roomName;
1240
+ }
1241
+ }
1230
1242
 
1231
1243
  const initialState$2 = {
1232
1244
  displayName: null,
@@ -1247,7 +1259,7 @@ const appSlice = toolkit.createSlice({
1247
1259
  reducers: {
1248
1260
  doAppStart: (state, action) => {
1249
1261
  const url = new URL(action.payload.roomUrl);
1250
- return Object.assign(Object.assign(Object.assign({}, state), action.payload), { roomName: url.pathname, initialConfig: Object.assign({}, action.payload), isActive: true, isAssistant: Boolean(action.payload.assistantKey) });
1262
+ return Object.assign(Object.assign(Object.assign({}, state), action.payload), { roomName: decodeRoomName(url.pathname), initialConfig: Object.assign({}, action.payload), isActive: true, isAssistant: Boolean(action.payload.assistantKey) });
1251
1263
  },
1252
1264
  doAppStop: (state) => {
1253
1265
  return Object.assign(Object.assign({}, state), { isActive: false });
package/dist/index.mjs CHANGED
@@ -1224,7 +1224,19 @@ const createReactor = (selectors, callback) => {
1224
1224
  });
1225
1225
  };
1226
1226
 
1227
- const coreVersion = "1.15.3";
1227
+ const coreVersion = "1.16.0";
1228
+
1229
+ function decodeRoomName(roomName) {
1230
+ if (!roomName) {
1231
+ return null;
1232
+ }
1233
+ try {
1234
+ return decodeURIComponent(roomName);
1235
+ }
1236
+ catch (_a) {
1237
+ return roomName;
1238
+ }
1239
+ }
1228
1240
 
1229
1241
  const initialState$2 = {
1230
1242
  displayName: null,
@@ -1245,7 +1257,7 @@ const appSlice = createSlice({
1245
1257
  reducers: {
1246
1258
  doAppStart: (state, action) => {
1247
1259
  const url = new URL(action.payload.roomUrl);
1248
- return Object.assign(Object.assign(Object.assign({}, state), action.payload), { roomName: url.pathname, initialConfig: Object.assign({}, action.payload), isActive: true, isAssistant: Boolean(action.payload.assistantKey) });
1260
+ return Object.assign(Object.assign(Object.assign({}, state), action.payload), { roomName: decodeRoomName(url.pathname), initialConfig: Object.assign({}, action.payload), isActive: true, isAssistant: Boolean(action.payload.assistantKey) });
1249
1261
  },
1250
1262
  doAppStop: (state) => {
1251
1263
  return Object.assign(Object.assign({}, state), { isActive: false });
@@ -1224,7 +1224,19 @@ const createReactor = (selectors, callback) => {
1224
1224
  });
1225
1225
  };
1226
1226
 
1227
- const coreVersion = "1.15.3";
1227
+ const coreVersion = "1.16.0";
1228
+
1229
+ function decodeRoomName(roomName) {
1230
+ if (!roomName) {
1231
+ return null;
1232
+ }
1233
+ try {
1234
+ return decodeURIComponent(roomName);
1235
+ }
1236
+ catch (_a) {
1237
+ return roomName;
1238
+ }
1239
+ }
1228
1240
 
1229
1241
  const initialState$2 = {
1230
1242
  displayName: null,
@@ -1245,7 +1257,7 @@ const appSlice = createSlice({
1245
1257
  reducers: {
1246
1258
  doAppStart: (state, action) => {
1247
1259
  const url = new URL(action.payload.roomUrl);
1248
- return Object.assign(Object.assign(Object.assign({}, state), action.payload), { roomName: url.pathname, initialConfig: Object.assign({}, action.payload), isActive: true, isAssistant: Boolean(action.payload.assistantKey) });
1260
+ return Object.assign(Object.assign(Object.assign({}, state), action.payload), { roomName: decodeRoomName(url.pathname), initialConfig: Object.assign({}, action.payload), isActive: true, isAssistant: Boolean(action.payload.assistantKey) });
1249
1261
  },
1250
1262
  doAppStop: (state) => {
1251
1263
  return Object.assign(Object.assign({}, state), { isActive: false });
@@ -76,7 +76,19 @@ const createReactor = (selectors, callback) => {
76
76
  });
77
77
  };
78
78
 
79
- const coreVersion = "1.15.3";
79
+ const coreVersion = "1.16.0";
80
+
81
+ function decodeRoomName(roomName) {
82
+ if (!roomName) {
83
+ return null;
84
+ }
85
+ try {
86
+ return decodeURIComponent(roomName);
87
+ }
88
+ catch (_a) {
89
+ return roomName;
90
+ }
91
+ }
80
92
 
81
93
  const initialState$2 = {
82
94
  displayName: null,
@@ -97,7 +109,7 @@ const appSlice = toolkit.createSlice({
97
109
  reducers: {
98
110
  doAppStart: (state, action) => {
99
111
  const url = new URL(action.payload.roomUrl);
100
- return Object.assign(Object.assign(Object.assign({}, state), action.payload), { roomName: url.pathname, initialConfig: Object.assign({}, action.payload), isActive: true, isAssistant: Boolean(action.payload.assistantKey) });
112
+ return Object.assign(Object.assign(Object.assign({}, state), action.payload), { roomName: decodeRoomName(url.pathname), initialConfig: Object.assign({}, action.payload), isActive: true, isAssistant: Boolean(action.payload.assistantKey) });
101
113
  },
102
114
  doAppStop: (state) => {
103
115
  return Object.assign(Object.assign({}, state), { isActive: false });
@@ -845,7 +845,7 @@ interface AppState {
845
845
  declare const initialState: AppState;
846
846
  declare const appSlice: _reduxjs_toolkit.Slice<AppState, {
847
847
  doAppStart: (state: immer.WritableDraft<AppState>, action: PayloadAction<AppConfig>) => {
848
- roomName: string;
848
+ roomName: string | null;
849
849
  initialConfig: {
850
850
  assistantKey?: string | null;
851
851
  displayName: string;
@@ -845,7 +845,7 @@ interface AppState {
845
845
  declare const initialState: AppState;
846
846
  declare const appSlice: _reduxjs_toolkit.Slice<AppState, {
847
847
  doAppStart: (state: immer.WritableDraft<AppState>, action: PayloadAction<AppConfig>) => {
848
- roomName: string;
848
+ roomName: string | null;
849
849
  initialConfig: {
850
850
  assistantKey?: string | null;
851
851
  displayName: string;
@@ -845,7 +845,7 @@ interface AppState {
845
845
  declare const initialState: AppState;
846
846
  declare const appSlice: _reduxjs_toolkit.Slice<AppState, {
847
847
  doAppStart: (state: immer.WritableDraft<AppState>, action: PayloadAction<AppConfig>) => {
848
- roomName: string;
848
+ roomName: string | null;
849
849
  initialConfig: {
850
850
  assistantKey?: string | null;
851
851
  displayName: string;
@@ -74,7 +74,19 @@ const createReactor = (selectors, callback) => {
74
74
  });
75
75
  };
76
76
 
77
- const coreVersion = "1.15.3";
77
+ const coreVersion = "1.16.0";
78
+
79
+ function decodeRoomName(roomName) {
80
+ if (!roomName) {
81
+ return null;
82
+ }
83
+ try {
84
+ return decodeURIComponent(roomName);
85
+ }
86
+ catch (_a) {
87
+ return roomName;
88
+ }
89
+ }
78
90
 
79
91
  const initialState$2 = {
80
92
  displayName: null,
@@ -95,7 +107,7 @@ const appSlice = createSlice({
95
107
  reducers: {
96
108
  doAppStart: (state, action) => {
97
109
  const url = new URL(action.payload.roomUrl);
98
- return Object.assign(Object.assign(Object.assign({}, state), action.payload), { roomName: url.pathname, initialConfig: Object.assign({}, action.payload), isActive: true, isAssistant: Boolean(action.payload.assistantKey) });
110
+ return Object.assign(Object.assign(Object.assign({}, state), action.payload), { roomName: decodeRoomName(url.pathname), initialConfig: Object.assign({}, action.payload), isActive: true, isAssistant: Boolean(action.payload.assistantKey) });
99
111
  },
100
112
  doAppStop: (state) => {
101
113
  return Object.assign(Object.assign({}, state), { isActive: false });
@@ -74,7 +74,19 @@ const createReactor = (selectors, callback) => {
74
74
  });
75
75
  };
76
76
 
77
- const coreVersion = "1.15.3";
77
+ const coreVersion = "1.16.0";
78
+
79
+ function decodeRoomName(roomName) {
80
+ if (!roomName) {
81
+ return null;
82
+ }
83
+ try {
84
+ return decodeURIComponent(roomName);
85
+ }
86
+ catch (_a) {
87
+ return roomName;
88
+ }
89
+ }
78
90
 
79
91
  const initialState$2 = {
80
92
  displayName: null,
@@ -95,7 +107,7 @@ const appSlice = createSlice({
95
107
  reducers: {
96
108
  doAppStart: (state, action) => {
97
109
  const url = new URL(action.payload.roomUrl);
98
- return Object.assign(Object.assign(Object.assign({}, state), action.payload), { roomName: url.pathname, initialConfig: Object.assign({}, action.payload), isActive: true, isAssistant: Boolean(action.payload.assistantKey) });
110
+ return Object.assign(Object.assign(Object.assign({}, state), action.payload), { roomName: decodeRoomName(url.pathname), initialConfig: Object.assign({}, action.payload), isActive: true, isAssistant: Boolean(action.payload.assistantKey) });
99
111
  },
100
112
  doAppStop: (state) => {
101
113
  return Object.assign(Object.assign({}, state), { isActive: false });
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@whereby.com/core",
3
3
  "description": "Core library for whereby.com sdk",
4
4
  "author": "Whereby AS",
5
- "version": "1.15.3",
5
+ "version": "1.16.0",
6
6
  "license": "MIT",
7
7
  "publishConfig": {
8
8
  "access": "public"