@whereby.com/core 1.10.19 → 1.11.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
@@ -1158,7 +1158,7 @@ const createReactor = (selectors, callback) => {
1158
1158
  });
1159
1159
  };
1160
1160
 
1161
- const coreVersion = "1.10.19";
1161
+ const coreVersion = "1.11.0";
1162
1162
 
1163
1163
  const initialState$1 = {
1164
1164
  displayName: null,
@@ -1210,6 +1210,7 @@ const signalEvents = {
1210
1210
  breakoutMoveToMain: createSignalEventAction("breakoutMoveToMain"),
1211
1211
  breakoutSessionUpdated: createSignalEventAction("breakoutSessionUpdated"),
1212
1212
  chatMessage: createSignalEventAction("chatMessage"),
1213
+ chatMessageRemoved: createSignalEventAction("chatMessageRemoved"),
1213
1214
  clientLeft: createSignalEventAction("clientLeft"),
1214
1215
  clientKicked: createSignalEventAction("clientKicked"),
1215
1216
  clientMetadataReceived: createSignalEventAction("clientMetadataReceived"),
@@ -1435,6 +1436,7 @@ function forwardSocketEvents(socket, dispatch) {
1435
1436
  socket.on("audio_enable_requested", (payload) => dispatch(signalEvents.audioEnableRequested(payload)));
1436
1437
  socket.on("client_metadata_received", (payload) => dispatch(signalEvents.clientMetadataReceived(payload)));
1437
1438
  socket.on("chat_message", (payload) => dispatch(signalEvents.chatMessage(payload)));
1439
+ socket.on("chat_message_removed", (payload) => dispatch(signalEvents.chatMessageRemoved(payload)));
1438
1440
  socket.on("disconnect", () => dispatch(signalEvents.disconnect()));
1439
1441
  socket.on("room_knocked", (payload) => dispatch(signalEvents.roomKnocked(payload)));
1440
1442
  socket.on("room_left", () => dispatch(signalEvents.roomLeft()));
@@ -2242,19 +2244,38 @@ const chatSlice = toolkit.createSlice({
2242
2244
  extraReducers(builder) {
2243
2245
  builder.addCase(signalEvents.chatMessage, (state, action) => {
2244
2246
  const message = {
2247
+ id: action.payload.id,
2245
2248
  senderId: action.payload.senderId,
2249
+ parentId: action.payload.parentId,
2246
2250
  timestamp: action.payload.timestamp,
2247
2251
  text: action.payload.text,
2252
+ sig: action.payload.sig,
2253
+ removed: false,
2248
2254
  };
2249
2255
  return Object.assign(Object.assign({}, state), { chatMessages: [...state.chatMessages, message] });
2250
2256
  });
2257
+ builder.addCase(signalEvents.chatMessageRemoved, (state, action) => {
2258
+ return Object.assign(Object.assign({}, state), { chatMessages: state.chatMessages.map((m) => {
2259
+ return Object.assign(Object.assign({}, m), (m.id === action.payload.id && {
2260
+ removed: true,
2261
+ }));
2262
+ }) });
2263
+ });
2251
2264
  },
2252
2265
  });
2253
2266
  const doSendChatMessage = createRoomConnectedThunk((payload) => (_, getState) => {
2254
2267
  const state = getState();
2255
2268
  const socket = selectSignalConnectionRaw(state).socket;
2256
2269
  const breakoutCurrentId = selectBreakoutCurrentId(state);
2257
- socket === null || socket === void 0 ? void 0 : socket.emit("chat_message", Object.assign(Object.assign({ text: payload.text }, (breakoutCurrentId && { breakoutGroup: breakoutCurrentId })), (payload.isBroadcast && { broadcast: true })));
2270
+ socket === null || socket === void 0 ? void 0 : socket.emit("chat_message", Object.assign(Object.assign(Object.assign({ text: payload.text }, (payload.parentId && { parentId: payload.parentId })), (breakoutCurrentId && { breakoutGroup: breakoutCurrentId })), (payload.isBroadcast && { broadcast: true })));
2271
+ });
2272
+ const doRemoveChatMessage = createRoomConnectedThunk(({ id, sig }) => (_, getState) => {
2273
+ const state = getState();
2274
+ const socket = selectSignalConnectionRaw(state).socket;
2275
+ socket === null || socket === void 0 ? void 0 : socket.emit("remove_chat_message", {
2276
+ id,
2277
+ sig,
2278
+ });
2258
2279
  });
2259
2280
  const selectChatMessages = (state) => state.chat.chatMessages;
2260
2281
 
@@ -3563,6 +3584,10 @@ startAppListening({
3563
3584
  actionCreator: signalEvents.chatMessage,
3564
3585
  effect: ({ payload }, { dispatch, getState }) => {
3565
3586
  const state = getState();
3587
+ const selfId = selectSelfId(state);
3588
+ if (selfId === payload.senderId) {
3589
+ return;
3590
+ }
3566
3591
  const client = selectRemoteParticipants(state).find(({ id }) => id === payload.senderId);
3567
3592
  if (!client) {
3568
3593
  console.warn("Could not find remote client that sent chat message");
@@ -3574,9 +3599,13 @@ startAppListening({
3574
3599
  props: {
3575
3600
  client,
3576
3601
  chatMessage: {
3602
+ id: payload.id,
3577
3603
  senderId: payload.senderId,
3604
+ parentId: payload.parentId,
3578
3605
  timestamp: payload.timestamp,
3579
3606
  text: payload.text,
3607
+ sig: payload.sig,
3608
+ removed: false,
3580
3609
  },
3581
3610
  },
3582
3611
  })));
@@ -4843,7 +4872,7 @@ class RoomConnectionClient extends BaseClient {
4843
4872
  startAppListening({
4844
4873
  actionCreator: signalEvents.chatMessage,
4845
4874
  effect: ({ payload }) => {
4846
- this.emit(CHAT_NEW_MESSAGE, payload);
4875
+ this.emit(CHAT_NEW_MESSAGE, Object.assign(Object.assign({}, payload), { removed: false }));
4847
4876
  },
4848
4877
  });
4849
4878
  }
@@ -4955,8 +4984,11 @@ class RoomConnectionClient extends BaseClient {
4955
4984
  return promise;
4956
4985
  });
4957
4986
  }
4958
- sendChatMessage(text) {
4959
- this.store.dispatch(doSendChatMessage({ text }));
4987
+ sendChatMessage(text, parentId) {
4988
+ this.store.dispatch(doSendChatMessage({ text, parentId }));
4989
+ }
4990
+ removeChatMessage(id, sig) {
4991
+ this.store.dispatch(doRemoveChatMessage({ id, sig }));
4960
4992
  }
4961
4993
  knock() {
4962
4994
  this.store.dispatch(doKnockRoom());
package/dist/index.d.cts CHANGED
@@ -504,7 +504,9 @@ interface rtcAnalyticsState {
504
504
  };
505
505
  }
506
506
 
507
- type ChatMessage$1 = Pick<ChatMessage$2, "senderId" | "timestamp" | "text">;
507
+ type ChatMessage$1 = Pick<ChatMessage$2, "id" | "senderId" | "parentId" | "timestamp" | "text" | "sig"> & {
508
+ removed: boolean;
509
+ };
508
510
  interface ChatState {
509
511
  chatMessages: ChatMessage$1[];
510
512
  }
@@ -1058,7 +1060,9 @@ interface ChatMessageState {
1058
1060
  }
1059
1061
  type ScreenshareState = Screenshare;
1060
1062
  type LocalScreenshareStatus = "starting" | "active";
1061
- type ChatMessage = Pick<ChatMessage$2, "senderId" | "timestamp" | "text">;
1063
+ type ChatMessage = Pick<ChatMessage$2, "id" | "senderId" | "parentId" | "timestamp" | "text" | "sig"> & {
1064
+ removed: boolean;
1065
+ };
1062
1066
  type CloudRecordingState = {
1063
1067
  error?: string;
1064
1068
  status: "recording" | "requested" | "error";
@@ -1198,7 +1202,8 @@ declare class RoomConnectionClient extends BaseClient<RoomConnectionState, RoomC
1198
1202
  getNotificationsEventEmitter(): NotificationsEventEmitter;
1199
1203
  initialize(options: WherebyClientOptions): void;
1200
1204
  joinRoom(): Promise<RoomJoinedSuccess>;
1201
- sendChatMessage(text: string): void;
1205
+ sendChatMessage(text: string, parentId?: string): void;
1206
+ removeChatMessage(id: string, sig?: string | null): void;
1202
1207
  knock(): void;
1203
1208
  cancelKnock(): void;
1204
1209
  leaveRoom(): void;
package/dist/index.d.mts CHANGED
@@ -504,7 +504,9 @@ interface rtcAnalyticsState {
504
504
  };
505
505
  }
506
506
 
507
- type ChatMessage$1 = Pick<ChatMessage$2, "senderId" | "timestamp" | "text">;
507
+ type ChatMessage$1 = Pick<ChatMessage$2, "id" | "senderId" | "parentId" | "timestamp" | "text" | "sig"> & {
508
+ removed: boolean;
509
+ };
508
510
  interface ChatState {
509
511
  chatMessages: ChatMessage$1[];
510
512
  }
@@ -1058,7 +1060,9 @@ interface ChatMessageState {
1058
1060
  }
1059
1061
  type ScreenshareState = Screenshare;
1060
1062
  type LocalScreenshareStatus = "starting" | "active";
1061
- type ChatMessage = Pick<ChatMessage$2, "senderId" | "timestamp" | "text">;
1063
+ type ChatMessage = Pick<ChatMessage$2, "id" | "senderId" | "parentId" | "timestamp" | "text" | "sig"> & {
1064
+ removed: boolean;
1065
+ };
1062
1066
  type CloudRecordingState = {
1063
1067
  error?: string;
1064
1068
  status: "recording" | "requested" | "error";
@@ -1198,7 +1202,8 @@ declare class RoomConnectionClient extends BaseClient<RoomConnectionState, RoomC
1198
1202
  getNotificationsEventEmitter(): NotificationsEventEmitter;
1199
1203
  initialize(options: WherebyClientOptions): void;
1200
1204
  joinRoom(): Promise<RoomJoinedSuccess>;
1201
- sendChatMessage(text: string): void;
1205
+ sendChatMessage(text: string, parentId?: string): void;
1206
+ removeChatMessage(id: string, sig?: string | null): void;
1202
1207
  knock(): void;
1203
1208
  cancelKnock(): void;
1204
1209
  leaveRoom(): void;
package/dist/index.d.ts CHANGED
@@ -504,7 +504,9 @@ interface rtcAnalyticsState {
504
504
  };
505
505
  }
506
506
 
507
- type ChatMessage$1 = Pick<ChatMessage$2, "senderId" | "timestamp" | "text">;
507
+ type ChatMessage$1 = Pick<ChatMessage$2, "id" | "senderId" | "parentId" | "timestamp" | "text" | "sig"> & {
508
+ removed: boolean;
509
+ };
508
510
  interface ChatState {
509
511
  chatMessages: ChatMessage$1[];
510
512
  }
@@ -1058,7 +1060,9 @@ interface ChatMessageState {
1058
1060
  }
1059
1061
  type ScreenshareState = Screenshare;
1060
1062
  type LocalScreenshareStatus = "starting" | "active";
1061
- type ChatMessage = Pick<ChatMessage$2, "senderId" | "timestamp" | "text">;
1063
+ type ChatMessage = Pick<ChatMessage$2, "id" | "senderId" | "parentId" | "timestamp" | "text" | "sig"> & {
1064
+ removed: boolean;
1065
+ };
1062
1066
  type CloudRecordingState = {
1063
1067
  error?: string;
1064
1068
  status: "recording" | "requested" | "error";
@@ -1198,7 +1202,8 @@ declare class RoomConnectionClient extends BaseClient<RoomConnectionState, RoomC
1198
1202
  getNotificationsEventEmitter(): NotificationsEventEmitter;
1199
1203
  initialize(options: WherebyClientOptions): void;
1200
1204
  joinRoom(): Promise<RoomJoinedSuccess>;
1201
- sendChatMessage(text: string): void;
1205
+ sendChatMessage(text: string, parentId?: string): void;
1206
+ removeChatMessage(id: string, sig?: string | null): void;
1202
1207
  knock(): void;
1203
1208
  cancelKnock(): void;
1204
1209
  leaveRoom(): void;
package/dist/index.mjs CHANGED
@@ -1156,7 +1156,7 @@ const createReactor = (selectors, callback) => {
1156
1156
  });
1157
1157
  };
1158
1158
 
1159
- const coreVersion = "1.10.19";
1159
+ const coreVersion = "1.11.0";
1160
1160
 
1161
1161
  const initialState$1 = {
1162
1162
  displayName: null,
@@ -1208,6 +1208,7 @@ const signalEvents = {
1208
1208
  breakoutMoveToMain: createSignalEventAction("breakoutMoveToMain"),
1209
1209
  breakoutSessionUpdated: createSignalEventAction("breakoutSessionUpdated"),
1210
1210
  chatMessage: createSignalEventAction("chatMessage"),
1211
+ chatMessageRemoved: createSignalEventAction("chatMessageRemoved"),
1211
1212
  clientLeft: createSignalEventAction("clientLeft"),
1212
1213
  clientKicked: createSignalEventAction("clientKicked"),
1213
1214
  clientMetadataReceived: createSignalEventAction("clientMetadataReceived"),
@@ -1433,6 +1434,7 @@ function forwardSocketEvents(socket, dispatch) {
1433
1434
  socket.on("audio_enable_requested", (payload) => dispatch(signalEvents.audioEnableRequested(payload)));
1434
1435
  socket.on("client_metadata_received", (payload) => dispatch(signalEvents.clientMetadataReceived(payload)));
1435
1436
  socket.on("chat_message", (payload) => dispatch(signalEvents.chatMessage(payload)));
1437
+ socket.on("chat_message_removed", (payload) => dispatch(signalEvents.chatMessageRemoved(payload)));
1436
1438
  socket.on("disconnect", () => dispatch(signalEvents.disconnect()));
1437
1439
  socket.on("room_knocked", (payload) => dispatch(signalEvents.roomKnocked(payload)));
1438
1440
  socket.on("room_left", () => dispatch(signalEvents.roomLeft()));
@@ -2240,19 +2242,38 @@ const chatSlice = createSlice({
2240
2242
  extraReducers(builder) {
2241
2243
  builder.addCase(signalEvents.chatMessage, (state, action) => {
2242
2244
  const message = {
2245
+ id: action.payload.id,
2243
2246
  senderId: action.payload.senderId,
2247
+ parentId: action.payload.parentId,
2244
2248
  timestamp: action.payload.timestamp,
2245
2249
  text: action.payload.text,
2250
+ sig: action.payload.sig,
2251
+ removed: false,
2246
2252
  };
2247
2253
  return Object.assign(Object.assign({}, state), { chatMessages: [...state.chatMessages, message] });
2248
2254
  });
2255
+ builder.addCase(signalEvents.chatMessageRemoved, (state, action) => {
2256
+ return Object.assign(Object.assign({}, state), { chatMessages: state.chatMessages.map((m) => {
2257
+ return Object.assign(Object.assign({}, m), (m.id === action.payload.id && {
2258
+ removed: true,
2259
+ }));
2260
+ }) });
2261
+ });
2249
2262
  },
2250
2263
  });
2251
2264
  const doSendChatMessage = createRoomConnectedThunk((payload) => (_, getState) => {
2252
2265
  const state = getState();
2253
2266
  const socket = selectSignalConnectionRaw(state).socket;
2254
2267
  const breakoutCurrentId = selectBreakoutCurrentId(state);
2255
- socket === null || socket === void 0 ? void 0 : socket.emit("chat_message", Object.assign(Object.assign({ text: payload.text }, (breakoutCurrentId && { breakoutGroup: breakoutCurrentId })), (payload.isBroadcast && { broadcast: true })));
2268
+ socket === null || socket === void 0 ? void 0 : socket.emit("chat_message", Object.assign(Object.assign(Object.assign({ text: payload.text }, (payload.parentId && { parentId: payload.parentId })), (breakoutCurrentId && { breakoutGroup: breakoutCurrentId })), (payload.isBroadcast && { broadcast: true })));
2269
+ });
2270
+ const doRemoveChatMessage = createRoomConnectedThunk(({ id, sig }) => (_, getState) => {
2271
+ const state = getState();
2272
+ const socket = selectSignalConnectionRaw(state).socket;
2273
+ socket === null || socket === void 0 ? void 0 : socket.emit("remove_chat_message", {
2274
+ id,
2275
+ sig,
2276
+ });
2256
2277
  });
2257
2278
  const selectChatMessages = (state) => state.chat.chatMessages;
2258
2279
 
@@ -3561,6 +3582,10 @@ startAppListening({
3561
3582
  actionCreator: signalEvents.chatMessage,
3562
3583
  effect: ({ payload }, { dispatch, getState }) => {
3563
3584
  const state = getState();
3585
+ const selfId = selectSelfId(state);
3586
+ if (selfId === payload.senderId) {
3587
+ return;
3588
+ }
3564
3589
  const client = selectRemoteParticipants(state).find(({ id }) => id === payload.senderId);
3565
3590
  if (!client) {
3566
3591
  console.warn("Could not find remote client that sent chat message");
@@ -3572,9 +3597,13 @@ startAppListening({
3572
3597
  props: {
3573
3598
  client,
3574
3599
  chatMessage: {
3600
+ id: payload.id,
3575
3601
  senderId: payload.senderId,
3602
+ parentId: payload.parentId,
3576
3603
  timestamp: payload.timestamp,
3577
3604
  text: payload.text,
3605
+ sig: payload.sig,
3606
+ removed: false,
3578
3607
  },
3579
3608
  },
3580
3609
  })));
@@ -4841,7 +4870,7 @@ class RoomConnectionClient extends BaseClient {
4841
4870
  startAppListening({
4842
4871
  actionCreator: signalEvents.chatMessage,
4843
4872
  effect: ({ payload }) => {
4844
- this.emit(CHAT_NEW_MESSAGE, payload);
4873
+ this.emit(CHAT_NEW_MESSAGE, Object.assign(Object.assign({}, payload), { removed: false }));
4845
4874
  },
4846
4875
  });
4847
4876
  }
@@ -4953,8 +4982,11 @@ class RoomConnectionClient extends BaseClient {
4953
4982
  return promise;
4954
4983
  });
4955
4984
  }
4956
- sendChatMessage(text) {
4957
- this.store.dispatch(doSendChatMessage({ text }));
4985
+ sendChatMessage(text, parentId) {
4986
+ this.store.dispatch(doSendChatMessage({ text, parentId }));
4987
+ }
4988
+ removeChatMessage(id, sig) {
4989
+ this.store.dispatch(doRemoveChatMessage({ id, sig }));
4958
4990
  }
4959
4991
  knock() {
4960
4992
  this.store.dispatch(doKnockRoom());
@@ -1156,7 +1156,7 @@ const createReactor = (selectors, callback) => {
1156
1156
  });
1157
1157
  };
1158
1158
 
1159
- const coreVersion = "1.10.19";
1159
+ const coreVersion = "1.11.0";
1160
1160
 
1161
1161
  const initialState$1 = {
1162
1162
  displayName: null,
@@ -1208,6 +1208,7 @@ const signalEvents = {
1208
1208
  breakoutMoveToMain: createSignalEventAction("breakoutMoveToMain"),
1209
1209
  breakoutSessionUpdated: createSignalEventAction("breakoutSessionUpdated"),
1210
1210
  chatMessage: createSignalEventAction("chatMessage"),
1211
+ chatMessageRemoved: createSignalEventAction("chatMessageRemoved"),
1211
1212
  clientLeft: createSignalEventAction("clientLeft"),
1212
1213
  clientKicked: createSignalEventAction("clientKicked"),
1213
1214
  clientMetadataReceived: createSignalEventAction("clientMetadataReceived"),
@@ -1433,6 +1434,7 @@ function forwardSocketEvents(socket, dispatch) {
1433
1434
  socket.on("audio_enable_requested", (payload) => dispatch(signalEvents.audioEnableRequested(payload)));
1434
1435
  socket.on("client_metadata_received", (payload) => dispatch(signalEvents.clientMetadataReceived(payload)));
1435
1436
  socket.on("chat_message", (payload) => dispatch(signalEvents.chatMessage(payload)));
1437
+ socket.on("chat_message_removed", (payload) => dispatch(signalEvents.chatMessageRemoved(payload)));
1436
1438
  socket.on("disconnect", () => dispatch(signalEvents.disconnect()));
1437
1439
  socket.on("room_knocked", (payload) => dispatch(signalEvents.roomKnocked(payload)));
1438
1440
  socket.on("room_left", () => dispatch(signalEvents.roomLeft()));
@@ -2240,19 +2242,38 @@ const chatSlice = createSlice({
2240
2242
  extraReducers(builder) {
2241
2243
  builder.addCase(signalEvents.chatMessage, (state, action) => {
2242
2244
  const message = {
2245
+ id: action.payload.id,
2243
2246
  senderId: action.payload.senderId,
2247
+ parentId: action.payload.parentId,
2244
2248
  timestamp: action.payload.timestamp,
2245
2249
  text: action.payload.text,
2250
+ sig: action.payload.sig,
2251
+ removed: false,
2246
2252
  };
2247
2253
  return Object.assign(Object.assign({}, state), { chatMessages: [...state.chatMessages, message] });
2248
2254
  });
2255
+ builder.addCase(signalEvents.chatMessageRemoved, (state, action) => {
2256
+ return Object.assign(Object.assign({}, state), { chatMessages: state.chatMessages.map((m) => {
2257
+ return Object.assign(Object.assign({}, m), (m.id === action.payload.id && {
2258
+ removed: true,
2259
+ }));
2260
+ }) });
2261
+ });
2249
2262
  },
2250
2263
  });
2251
2264
  const doSendChatMessage = createRoomConnectedThunk((payload) => (_, getState) => {
2252
2265
  const state = getState();
2253
2266
  const socket = selectSignalConnectionRaw(state).socket;
2254
2267
  const breakoutCurrentId = selectBreakoutCurrentId(state);
2255
- socket === null || socket === void 0 ? void 0 : socket.emit("chat_message", Object.assign(Object.assign({ text: payload.text }, (breakoutCurrentId && { breakoutGroup: breakoutCurrentId })), (payload.isBroadcast && { broadcast: true })));
2268
+ socket === null || socket === void 0 ? void 0 : socket.emit("chat_message", Object.assign(Object.assign(Object.assign({ text: payload.text }, (payload.parentId && { parentId: payload.parentId })), (breakoutCurrentId && { breakoutGroup: breakoutCurrentId })), (payload.isBroadcast && { broadcast: true })));
2269
+ });
2270
+ const doRemoveChatMessage = createRoomConnectedThunk(({ id, sig }) => (_, getState) => {
2271
+ const state = getState();
2272
+ const socket = selectSignalConnectionRaw(state).socket;
2273
+ socket === null || socket === void 0 ? void 0 : socket.emit("remove_chat_message", {
2274
+ id,
2275
+ sig,
2276
+ });
2256
2277
  });
2257
2278
  const selectChatMessages = (state) => state.chat.chatMessages;
2258
2279
 
@@ -3561,6 +3582,10 @@ startAppListening({
3561
3582
  actionCreator: signalEvents.chatMessage,
3562
3583
  effect: ({ payload }, { dispatch, getState }) => {
3563
3584
  const state = getState();
3585
+ const selfId = selectSelfId(state);
3586
+ if (selfId === payload.senderId) {
3587
+ return;
3588
+ }
3564
3589
  const client = selectRemoteParticipants(state).find(({ id }) => id === payload.senderId);
3565
3590
  if (!client) {
3566
3591
  console.warn("Could not find remote client that sent chat message");
@@ -3572,9 +3597,13 @@ startAppListening({
3572
3597
  props: {
3573
3598
  client,
3574
3599
  chatMessage: {
3600
+ id: payload.id,
3575
3601
  senderId: payload.senderId,
3602
+ parentId: payload.parentId,
3576
3603
  timestamp: payload.timestamp,
3577
3604
  text: payload.text,
3605
+ sig: payload.sig,
3606
+ removed: false,
3578
3607
  },
3579
3608
  },
3580
3609
  })));
@@ -4841,7 +4870,7 @@ class RoomConnectionClient extends BaseClient {
4841
4870
  startAppListening({
4842
4871
  actionCreator: signalEvents.chatMessage,
4843
4872
  effect: ({ payload }) => {
4844
- this.emit(CHAT_NEW_MESSAGE, payload);
4873
+ this.emit(CHAT_NEW_MESSAGE, Object.assign(Object.assign({}, payload), { removed: false }));
4845
4874
  },
4846
4875
  });
4847
4876
  }
@@ -4953,8 +4982,11 @@ class RoomConnectionClient extends BaseClient {
4953
4982
  return promise;
4954
4983
  });
4955
4984
  }
4956
- sendChatMessage(text) {
4957
- this.store.dispatch(doSendChatMessage({ text }));
4985
+ sendChatMessage(text, parentId) {
4986
+ this.store.dispatch(doSendChatMessage({ text, parentId }));
4987
+ }
4988
+ removeChatMessage(id, sig) {
4989
+ this.store.dispatch(doRemoveChatMessage({ id, sig }));
4958
4990
  }
4959
4991
  knock() {
4960
4992
  this.store.dispatch(doKnockRoom());
@@ -75,7 +75,7 @@ const createReactor = (selectors, callback) => {
75
75
  });
76
76
  };
77
77
 
78
- const coreVersion = "1.10.19";
78
+ const coreVersion = "1.11.0";
79
79
 
80
80
  const initialState$1 = {
81
81
  displayName: null,
@@ -129,6 +129,7 @@ const signalEvents = {
129
129
  breakoutMoveToMain: createSignalEventAction("breakoutMoveToMain"),
130
130
  breakoutSessionUpdated: createSignalEventAction("breakoutSessionUpdated"),
131
131
  chatMessage: createSignalEventAction("chatMessage"),
132
+ chatMessageRemoved: createSignalEventAction("chatMessageRemoved"),
132
133
  clientLeft: createSignalEventAction("clientLeft"),
133
134
  clientKicked: createSignalEventAction("clientKicked"),
134
135
  clientMetadataReceived: createSignalEventAction("clientMetadataReceived"),
@@ -307,6 +308,7 @@ function forwardSocketEvents(socket, dispatch) {
307
308
  socket.on("audio_enable_requested", (payload) => dispatch(signalEvents.audioEnableRequested(payload)));
308
309
  socket.on("client_metadata_received", (payload) => dispatch(signalEvents.clientMetadataReceived(payload)));
309
310
  socket.on("chat_message", (payload) => dispatch(signalEvents.chatMessage(payload)));
311
+ socket.on("chat_message_removed", (payload) => dispatch(signalEvents.chatMessageRemoved(payload)));
310
312
  socket.on("disconnect", () => dispatch(signalEvents.disconnect()));
311
313
  socket.on("room_knocked", (payload) => dispatch(signalEvents.roomKnocked(payload)));
312
314
  socket.on("room_left", () => dispatch(signalEvents.roomLeft()));
@@ -1136,19 +1138,38 @@ const chatSlice = toolkit.createSlice({
1136
1138
  extraReducers(builder) {
1137
1139
  builder.addCase(signalEvents.chatMessage, (state, action) => {
1138
1140
  const message = {
1141
+ id: action.payload.id,
1139
1142
  senderId: action.payload.senderId,
1143
+ parentId: action.payload.parentId,
1140
1144
  timestamp: action.payload.timestamp,
1141
1145
  text: action.payload.text,
1146
+ sig: action.payload.sig,
1147
+ removed: false,
1142
1148
  };
1143
1149
  return Object.assign(Object.assign({}, state), { chatMessages: [...state.chatMessages, message] });
1144
1150
  });
1151
+ builder.addCase(signalEvents.chatMessageRemoved, (state, action) => {
1152
+ return Object.assign(Object.assign({}, state), { chatMessages: state.chatMessages.map((m) => {
1153
+ return Object.assign(Object.assign({}, m), (m.id === action.payload.id && {
1154
+ removed: true,
1155
+ }));
1156
+ }) });
1157
+ });
1145
1158
  },
1146
1159
  });
1147
1160
  const doSendChatMessage = createRoomConnectedThunk((payload) => (_, getState) => {
1148
1161
  const state = getState();
1149
1162
  const socket = selectSignalConnectionRaw(state).socket;
1150
1163
  const breakoutCurrentId = selectBreakoutCurrentId(state);
1151
- socket === null || socket === void 0 ? void 0 : socket.emit("chat_message", Object.assign(Object.assign({ text: payload.text }, (breakoutCurrentId && { breakoutGroup: breakoutCurrentId })), (payload.isBroadcast && { broadcast: true })));
1164
+ socket === null || socket === void 0 ? void 0 : socket.emit("chat_message", Object.assign(Object.assign(Object.assign({ text: payload.text }, (payload.parentId && { parentId: payload.parentId })), (breakoutCurrentId && { breakoutGroup: breakoutCurrentId })), (payload.isBroadcast && { broadcast: true })));
1165
+ });
1166
+ const doRemoveChatMessage = createRoomConnectedThunk(({ id, sig }) => (_, getState) => {
1167
+ const state = getState();
1168
+ const socket = selectSignalConnectionRaw(state).socket;
1169
+ socket === null || socket === void 0 ? void 0 : socket.emit("remove_chat_message", {
1170
+ id,
1171
+ sig,
1172
+ });
1152
1173
  });
1153
1174
  const selectChatRaw = (state) => state.chat;
1154
1175
  const selectChatMessages = (state) => state.chat.chatMessages;
@@ -2480,6 +2501,10 @@ startAppListening({
2480
2501
  actionCreator: signalEvents.chatMessage,
2481
2502
  effect: ({ payload }, { dispatch, getState }) => {
2482
2503
  const state = getState();
2504
+ const selfId = selectSelfId(state);
2505
+ if (selfId === payload.senderId) {
2506
+ return;
2507
+ }
2483
2508
  const client = selectRemoteParticipants(state).find(({ id }) => id === payload.senderId);
2484
2509
  if (!client) {
2485
2510
  console.warn("Could not find remote client that sent chat message");
@@ -2491,9 +2516,13 @@ startAppListening({
2491
2516
  props: {
2492
2517
  client,
2493
2518
  chatMessage: {
2519
+ id: payload.id,
2494
2520
  senderId: payload.senderId,
2521
+ parentId: payload.parentId,
2495
2522
  timestamp: payload.timestamp,
2496
2523
  text: payload.text,
2524
+ sig: payload.sig,
2525
+ removed: false,
2497
2526
  },
2498
2527
  },
2499
2528
  })));
@@ -4054,6 +4083,7 @@ exports.doLocalStreamEffect = doLocalStreamEffect;
4054
4083
  exports.doLockRoom = doLockRoom;
4055
4084
  exports.doOrganizationFetch = doOrganizationFetch;
4056
4085
  exports.doRejectWaitingParticipant = doRejectWaitingParticipant;
4086
+ exports.doRemoveChatMessage = doRemoveChatMessage;
4057
4087
  exports.doRemoveSpotlight = doRemoveSpotlight;
4058
4088
  exports.doRequestAudioEnable = doRequestAudioEnable;
4059
4089
  exports.doRequestVideoEnable = doRequestVideoEnable;
@@ -5,7 +5,7 @@ import { AxiosRequestConfig } from 'axios';
5
5
  import { EventEmitter } from 'events';
6
6
  import * as redux from 'redux';
7
7
  import * as _whereby_com_media from '@whereby.com/media';
8
- import { RoleName, ChatMessage as ChatMessage$1, BreakoutConfig, getDeviceData, SignalClient, RtcStreamAddedPayload, AudioEnableRequest, VideoEnableRequest, RtcManagerCreatedPayload, RtcClientConnectionStatusChangedPayload, RtcManager, RtcManagerDispatcher, RtcEvents, AudioEnabledEvent, AudioEnableRequestedEvent, BreakoutGroupJoinedEvent, BreakoutSessionUpdatedEvent, ClientLeftEvent, ClientKickedEvent, ClientMetadataReceivedEvent, ClientUnableToJoinEvent, CloudRecordingStartedEvent, KnockerLeftEvent, KnockAcceptedEvent, KnockRejectedEvent, NewClientEvent, RoomJoinedEvent, RoomKnockedEvent, RoomLockedEvent, RoomSessionEndedEvent, ScreenshareStartedEvent, ScreenshareStoppedEvent, SpotlightAddedEvent, SpotlightRemovedEvent, VideoEnabledEvent, VideoEnableRequestedEvent, LiveTranscriptionStartedEvent, LiveTranscriptionStoppedEvent, ServerSocket, Spotlight } from '@whereby.com/media';
8
+ import { RoleName, ChatMessage as ChatMessage$1, BreakoutConfig, getDeviceData, SignalClient, RtcStreamAddedPayload, AudioEnableRequest, VideoEnableRequest, RtcManagerCreatedPayload, RtcClientConnectionStatusChangedPayload, RtcManager, RtcManagerDispatcher, RtcEvents, AudioEnabledEvent, AudioEnableRequestedEvent, BreakoutGroupJoinedEvent, BreakoutSessionUpdatedEvent, ChatMessageRemoved, ClientLeftEvent, ClientKickedEvent, ClientMetadataReceivedEvent, ClientUnableToJoinEvent, CloudRecordingStartedEvent, KnockerLeftEvent, KnockAcceptedEvent, KnockRejectedEvent, NewClientEvent, RoomJoinedEvent, RoomKnockedEvent, RoomLockedEvent, RoomSessionEndedEvent, ScreenshareStartedEvent, ScreenshareStoppedEvent, SpotlightAddedEvent, SpotlightRemovedEvent, VideoEnabledEvent, VideoEnableRequestedEvent, LiveTranscriptionStartedEvent, LiveTranscriptionStoppedEvent, ServerSocket, Spotlight } from '@whereby.com/media';
9
9
  import * as immer from 'immer';
10
10
  import * as reselect from 'reselect';
11
11
  import { Setup, Params } from '@whereby.com/camera-effects';
@@ -445,7 +445,9 @@ declare const updateReportedValues: ActionCreatorWithPayload<{
445
445
  value: unknown;
446
446
  }, "rtcAnalytics/updateReportedValues">;
447
447
 
448
- type ChatMessage = Pick<ChatMessage$1, "senderId" | "timestamp" | "text">;
448
+ type ChatMessage = Pick<ChatMessage$1, "id" | "senderId" | "parentId" | "timestamp" | "text" | "sig"> & {
449
+ removed: boolean;
450
+ };
449
451
  interface ChatState {
450
452
  chatMessages: ChatMessage[];
451
453
  }
@@ -454,7 +456,9 @@ declare const chatSlice: _reduxjs_toolkit.Slice<ChatState, {}, "chat", "chat", _
454
456
  declare const doSendChatMessage: (args: {
455
457
  text: string;
456
458
  isBroadcast?: boolean;
459
+ parentId?: string;
457
460
  }) => AppThunk;
461
+ declare const doRemoveChatMessage: (args: Pick<ChatMessage$1, "id" | "sig">) => AppThunk;
458
462
  declare const selectChatRaw: (state: RootState) => ChatState;
459
463
  declare const selectChatMessages: (state: RootState) => ChatMessage[];
460
464
 
@@ -4180,6 +4184,7 @@ declare const signalEvents: {
4180
4184
  breakoutMoveToMain: _reduxjs_toolkit.ActionCreatorWithoutPayload<string>;
4181
4185
  breakoutSessionUpdated: _reduxjs_toolkit.ActionCreatorWithPayload<BreakoutSessionUpdatedEvent, string>;
4182
4186
  chatMessage: _reduxjs_toolkit.ActionCreatorWithPayload<ChatMessage$1, string>;
4187
+ chatMessageRemoved: _reduxjs_toolkit.ActionCreatorWithPayload<ChatMessageRemoved, string>;
4183
4188
  clientLeft: _reduxjs_toolkit.ActionCreatorWithPayload<ClientLeftEvent, string>;
4184
4189
  clientKicked: _reduxjs_toolkit.ActionCreatorWithPayload<ClientKickedEvent, string>;
4185
4190
  clientMetadataReceived: _reduxjs_toolkit.ActionCreatorWithPayload<ClientMetadataReceivedEvent, string>;
@@ -4966,5 +4971,5 @@ declare const selectRoomConnectionSessionId: (state: RootState) => string | unde
4966
4971
  declare const selectRoomConnectionStatus: (state: RootState) => ConnectionStatus;
4967
4972
  declare const selectRoomConnectionError: (state: RootState) => string | null;
4968
4973
 
4969
- export { addAppListener, addSpotlight, appSlice, authorizationSlice, authorizationSliceInitialState, breakoutSlice, breakoutSliceInitialState, chatSlice, chatSliceInitialState, cloudRecordingSlice, connectionMonitorSlice, connectionMonitorSliceInitialState, connectionMonitorStarted, connectionMonitorStopped, createAppAsyncThunk, createAppAuthorizedThunk, createAppThunk, createAsyncRoomConnectedThunk, createAuthorizedRoomConnectedThunk, createReactor, createRemoteParticipant, createRoomConnectedThunk, createServices, createStore, createWebRtcEmitter, deviceBusy, deviceCredentialsSlice, deviceCredentialsSliceInitialState, deviceIdentified, deviceIdentifying, doAcceptWaitingParticipant, doAppStart, doAppStop, doBreakoutJoin, doCancelKnock, doClearNotifications, doConnectRoom, doConnectRtc, doDisconnectRtc, doEnableAudio, doEnableVideo, doEndMeeting, doGetDeviceCredentials, doHandleAcceptStreams, doHandleStreamingStarted, doHandleStreamingStopped, doKickParticipant, doKnockRoom, doLocalStreamEffect, doLockRoom, doOrganizationFetch, doRejectWaitingParticipant, doRemoveSpotlight, doRequestAudioEnable, doRequestVideoEnable, doRtcAnalyticsCustomEventsInitialize, doRtcManagerCreated, doRtcManagerInitialize, doRtcReportStreamResolution, doSendChatMessage, doSendClientMetadata, doSetDevice, doSetDisplayName, doSetLocalStickyReaction, doSetNotification, doSignalConnect, doSignalDisconnect, doSignalIdentifyDevice, doSpotlightParticipant, doStartCloudRecording, doStartConnectionMonitor, doStartLiveTranscription, doStartLocalMedia, doStartScreenshare, doStopCloudRecording, doStopConnectionMonitor, doStopLiveTranscription, doStopLocalMedia, doStopScreenshare, doSwitchLocalStream, doToggleCamera, doToggleLowDataMode, doUpdateDeviceList, initialCloudRecordingState, initialLiveTranscriptionState, initialLocalMediaState, initialNotificationsState, initialState, isAcceptingStreams, isClientSpotlighted, listenerMiddleware, liveTranscriptionSlice, localMediaSlice, localMediaStopped, localParticipantSlice, localParticipantSliceInitialState, localScreenshareSlice, localScreenshareSliceInitialState, localStreamMetadataUpdated, notificationsSlice, observeStore, organizationSlice, organizationSliceInitialState, participantStreamAdded, participantStreamIdAdded, recordingRequestStarted, remoteParticipantsSlice, remoteParticipantsSliceInitialState, removeSpotlight, resolutionReported, roomConnectionSlice, roomConnectionSliceInitialState, roomSlice, roomSliceInitialState, rootReducer, rtcAnalyticsCustomEvents, rtcAnalyticsSlice, rtcAnalyticsSliceInitialState, rtcClientConnectionStatusChanged, rtcConnectionSlice, rtcConnectionSliceInitialState, rtcDisconnected, rtcDispatcherCreated, rtcEvents, rtcManagerCreated, rtcManagerDestroyed, rtcManagerInitialized, selectAllClientViews, selectAllClientViewsInCurrentGroup, selectAppDisplayName, selectAppExternalId, selectAppIgnoreBreakoutGroups, selectAppInitialConfig, selectAppIsActive, selectAppIsAssistant, selectAppIsAudioRecorder, selectAppIsDialIn, selectAppIsNodeSdk, selectAppRaw, selectAppRoomName, selectAppRoomUrl, selectAppUserAgent, selectAssistantKey, selectAuthorizationRoleName, selectBreakoutActive, selectBreakoutAssignments, selectBreakoutCurrentGroup, selectBreakoutCurrentId, selectBreakoutGroupedParticipants, selectBreakoutGroups, selectBreakoutInitiatedBy, selectBreakoutRaw, selectBusyDeviceIds, selectCameraDeviceError, selectCameraDevices, selectChatMessages, selectChatRaw, selectCloudRecordingError, selectCloudRecordingIsInitiator, selectCloudRecordingRaw, selectCloudRecordingStartedAt, selectCloudRecordingStatus, selectConnectionMonitorIsRunning, selectCurrentCameraDeviceId, selectCurrentMicrophoneDeviceId, selectCurrentSpeakerDeviceId, selectDeviceCredentialsRaw, selectDeviceId, selectHasFetchedDeviceCredentials, selectIsAcceptingStreams, selectIsAuthorizedToAskToSpeak, selectIsAuthorizedToEndMeeting, selectIsAuthorizedToKickClient, selectIsAuthorizedToLockRoom, selectIsAuthorizedToRequestAudioEnable, selectIsAuthorizedToRequestVideoEnable, selectIsAuthorizedToSpotlight, selectIsCameraEnabled, selectIsCloudRecording, selectIsLiveTranscription, selectIsLocalMediaStarting, selectIsLocalParticipantSpotlighted, selectIsLowDataModeEnabled, selectIsMicrophoneEnabled, selectIsSettingCameraDevice, selectIsSettingMicrophoneDevice, selectIsToggleCamera, selectLiveTranscriptionError, selectLiveTranscriptionIsInitiator, selectLiveTranscriptionRaw, selectLiveTranscriptionStartedAt, selectLiveTranscriptionStatus, selectLocalMediaBeforeEffectTracks, selectLocalMediaConstraintsOptions, selectLocalMediaDevices, selectLocalMediaIsSwitchingStream, selectLocalMediaOptions, selectLocalMediaOwnsStream, selectLocalMediaRaw, selectLocalMediaShouldStartWithOptions, selectLocalMediaShouldStop, selectLocalMediaStartError, selectLocalMediaStatus, selectLocalMediaStream, selectLocalParticipantBreakoutAssigned, selectLocalParticipantBreakoutGroup, selectLocalParticipantClientClaim, selectLocalParticipantDisplayName, selectLocalParticipantIsScreenSharing, selectLocalParticipantRaw, selectLocalParticipantStickyReaction, selectLocalParticipantView, selectLocalScreenshareRaw, selectLocalScreenshareStatus, selectLocalScreenshareStream, selectMicrophoneDeviceError, selectMicrophoneDevices, selectNotificationsEmitter, selectNotificationsEvents, selectNotificationsRaw, selectNumClients, selectNumParticipants, selectOrganizationId, selectOrganizationPreferences, selectOrganizationRaw, selectRemoteClientViews, selectRemoteClients, selectRemoteParticipants, selectRemoteParticipantsRaw, selectRoomConnectionError, selectRoomConnectionRaw, selectRoomConnectionSession, selectRoomConnectionSessionId, selectRoomConnectionStatus, selectRoomIsLocked, selectRoomKey, selectRtcConnectionRaw, selectRtcDispatcherCreated, selectRtcIsCreatingDispatcher, selectRtcManager, selectRtcManagerInitialized, selectRtcStatus, selectScreenshares, selectSelfId, selectShouldConnectRoom, selectShouldConnectRtc, selectShouldConnectSignal, selectShouldDisconnectRtc, selectShouldFetchDeviceCredentials, selectShouldFetchOrganization, selectShouldIdentifyDevice, selectShouldInitializeRtc, selectShouldStartConnectionMonitor, selectShouldStopConnectionMonitor, selectSignalConnectionDeviceIdentified, selectSignalConnectionRaw, selectSignalConnectionSocket, selectSignalIsIdentifyingDevice, selectSignalStatus, selectSpeakerDevices, selectSpotlightedClientViews, selectSpotlights, selectSpotlightsRaw, selectStopCallbackFunction, selectStreamingRaw, selectStreamsToAccept, selectWaitingParticipants, selectWaitingParticipantsRaw, setBreakoutGroupAssigned, setCurrentCameraDeviceId, setCurrentMicrophoneDeviceId, setCurrentSpeakerDeviceId, setDisplayName, setLocalMediaOptions, setLocalMediaStream, setRoomKey, signalConnectionSlice, signalConnectionSliceInitialState, signalEvents, socketConnected, socketConnecting, socketDisconnected, socketReconnecting, spotlightsSlice, spotlightsSliceInitialState, startAppListening, stopScreenshare, streamIdForClient, streamStatusUpdated, streamingSlice, streamingSliceInitialState, toggleCameraEnabled, toggleLowDataModeEnabled, toggleMicrophoneEnabled, transcribingRequestStarted, updateReportedValues, waitingParticipantsSlice, waitingParticipantsSliceInitialState };
4974
+ export { addAppListener, addSpotlight, appSlice, authorizationSlice, authorizationSliceInitialState, breakoutSlice, breakoutSliceInitialState, chatSlice, chatSliceInitialState, cloudRecordingSlice, connectionMonitorSlice, connectionMonitorSliceInitialState, connectionMonitorStarted, connectionMonitorStopped, createAppAsyncThunk, createAppAuthorizedThunk, createAppThunk, createAsyncRoomConnectedThunk, createAuthorizedRoomConnectedThunk, createReactor, createRemoteParticipant, createRoomConnectedThunk, createServices, createStore, createWebRtcEmitter, deviceBusy, deviceCredentialsSlice, deviceCredentialsSliceInitialState, deviceIdentified, deviceIdentifying, doAcceptWaitingParticipant, doAppStart, doAppStop, doBreakoutJoin, doCancelKnock, doClearNotifications, doConnectRoom, doConnectRtc, doDisconnectRtc, doEnableAudio, doEnableVideo, doEndMeeting, doGetDeviceCredentials, doHandleAcceptStreams, doHandleStreamingStarted, doHandleStreamingStopped, doKickParticipant, doKnockRoom, doLocalStreamEffect, doLockRoom, doOrganizationFetch, doRejectWaitingParticipant, doRemoveChatMessage, doRemoveSpotlight, doRequestAudioEnable, doRequestVideoEnable, doRtcAnalyticsCustomEventsInitialize, doRtcManagerCreated, doRtcManagerInitialize, doRtcReportStreamResolution, doSendChatMessage, doSendClientMetadata, doSetDevice, doSetDisplayName, doSetLocalStickyReaction, doSetNotification, doSignalConnect, doSignalDisconnect, doSignalIdentifyDevice, doSpotlightParticipant, doStartCloudRecording, doStartConnectionMonitor, doStartLiveTranscription, doStartLocalMedia, doStartScreenshare, doStopCloudRecording, doStopConnectionMonitor, doStopLiveTranscription, doStopLocalMedia, doStopScreenshare, doSwitchLocalStream, doToggleCamera, doToggleLowDataMode, doUpdateDeviceList, initialCloudRecordingState, initialLiveTranscriptionState, initialLocalMediaState, initialNotificationsState, initialState, isAcceptingStreams, isClientSpotlighted, listenerMiddleware, liveTranscriptionSlice, localMediaSlice, localMediaStopped, localParticipantSlice, localParticipantSliceInitialState, localScreenshareSlice, localScreenshareSliceInitialState, localStreamMetadataUpdated, notificationsSlice, observeStore, organizationSlice, organizationSliceInitialState, participantStreamAdded, participantStreamIdAdded, recordingRequestStarted, remoteParticipantsSlice, remoteParticipantsSliceInitialState, removeSpotlight, resolutionReported, roomConnectionSlice, roomConnectionSliceInitialState, roomSlice, roomSliceInitialState, rootReducer, rtcAnalyticsCustomEvents, rtcAnalyticsSlice, rtcAnalyticsSliceInitialState, rtcClientConnectionStatusChanged, rtcConnectionSlice, rtcConnectionSliceInitialState, rtcDisconnected, rtcDispatcherCreated, rtcEvents, rtcManagerCreated, rtcManagerDestroyed, rtcManagerInitialized, selectAllClientViews, selectAllClientViewsInCurrentGroup, selectAppDisplayName, selectAppExternalId, selectAppIgnoreBreakoutGroups, selectAppInitialConfig, selectAppIsActive, selectAppIsAssistant, selectAppIsAudioRecorder, selectAppIsDialIn, selectAppIsNodeSdk, selectAppRaw, selectAppRoomName, selectAppRoomUrl, selectAppUserAgent, selectAssistantKey, selectAuthorizationRoleName, selectBreakoutActive, selectBreakoutAssignments, selectBreakoutCurrentGroup, selectBreakoutCurrentId, selectBreakoutGroupedParticipants, selectBreakoutGroups, selectBreakoutInitiatedBy, selectBreakoutRaw, selectBusyDeviceIds, selectCameraDeviceError, selectCameraDevices, selectChatMessages, selectChatRaw, selectCloudRecordingError, selectCloudRecordingIsInitiator, selectCloudRecordingRaw, selectCloudRecordingStartedAt, selectCloudRecordingStatus, selectConnectionMonitorIsRunning, selectCurrentCameraDeviceId, selectCurrentMicrophoneDeviceId, selectCurrentSpeakerDeviceId, selectDeviceCredentialsRaw, selectDeviceId, selectHasFetchedDeviceCredentials, selectIsAcceptingStreams, selectIsAuthorizedToAskToSpeak, selectIsAuthorizedToEndMeeting, selectIsAuthorizedToKickClient, selectIsAuthorizedToLockRoom, selectIsAuthorizedToRequestAudioEnable, selectIsAuthorizedToRequestVideoEnable, selectIsAuthorizedToSpotlight, selectIsCameraEnabled, selectIsCloudRecording, selectIsLiveTranscription, selectIsLocalMediaStarting, selectIsLocalParticipantSpotlighted, selectIsLowDataModeEnabled, selectIsMicrophoneEnabled, selectIsSettingCameraDevice, selectIsSettingMicrophoneDevice, selectIsToggleCamera, selectLiveTranscriptionError, selectLiveTranscriptionIsInitiator, selectLiveTranscriptionRaw, selectLiveTranscriptionStartedAt, selectLiveTranscriptionStatus, selectLocalMediaBeforeEffectTracks, selectLocalMediaConstraintsOptions, selectLocalMediaDevices, selectLocalMediaIsSwitchingStream, selectLocalMediaOptions, selectLocalMediaOwnsStream, selectLocalMediaRaw, selectLocalMediaShouldStartWithOptions, selectLocalMediaShouldStop, selectLocalMediaStartError, selectLocalMediaStatus, selectLocalMediaStream, selectLocalParticipantBreakoutAssigned, selectLocalParticipantBreakoutGroup, selectLocalParticipantClientClaim, selectLocalParticipantDisplayName, selectLocalParticipantIsScreenSharing, selectLocalParticipantRaw, selectLocalParticipantStickyReaction, selectLocalParticipantView, selectLocalScreenshareRaw, selectLocalScreenshareStatus, selectLocalScreenshareStream, selectMicrophoneDeviceError, selectMicrophoneDevices, selectNotificationsEmitter, selectNotificationsEvents, selectNotificationsRaw, selectNumClients, selectNumParticipants, selectOrganizationId, selectOrganizationPreferences, selectOrganizationRaw, selectRemoteClientViews, selectRemoteClients, selectRemoteParticipants, selectRemoteParticipantsRaw, selectRoomConnectionError, selectRoomConnectionRaw, selectRoomConnectionSession, selectRoomConnectionSessionId, selectRoomConnectionStatus, selectRoomIsLocked, selectRoomKey, selectRtcConnectionRaw, selectRtcDispatcherCreated, selectRtcIsCreatingDispatcher, selectRtcManager, selectRtcManagerInitialized, selectRtcStatus, selectScreenshares, selectSelfId, selectShouldConnectRoom, selectShouldConnectRtc, selectShouldConnectSignal, selectShouldDisconnectRtc, selectShouldFetchDeviceCredentials, selectShouldFetchOrganization, selectShouldIdentifyDevice, selectShouldInitializeRtc, selectShouldStartConnectionMonitor, selectShouldStopConnectionMonitor, selectSignalConnectionDeviceIdentified, selectSignalConnectionRaw, selectSignalConnectionSocket, selectSignalIsIdentifyingDevice, selectSignalStatus, selectSpeakerDevices, selectSpotlightedClientViews, selectSpotlights, selectSpotlightsRaw, selectStopCallbackFunction, selectStreamingRaw, selectStreamsToAccept, selectWaitingParticipants, selectWaitingParticipantsRaw, setBreakoutGroupAssigned, setCurrentCameraDeviceId, setCurrentMicrophoneDeviceId, setCurrentSpeakerDeviceId, setDisplayName, setLocalMediaOptions, setLocalMediaStream, setRoomKey, signalConnectionSlice, signalConnectionSliceInitialState, signalEvents, socketConnected, socketConnecting, socketDisconnected, socketReconnecting, spotlightsSlice, spotlightsSliceInitialState, startAppListening, stopScreenshare, streamIdForClient, streamStatusUpdated, streamingSlice, streamingSliceInitialState, toggleCameraEnabled, toggleLowDataModeEnabled, toggleMicrophoneEnabled, transcribingRequestStarted, updateReportedValues, waitingParticipantsSlice, waitingParticipantsSliceInitialState };
4970
4975
  export type { AppConfig, AppDispatch, AppReducer, AppStartListening, AppState, AppThunk, AuthorizationState, BreakoutState, ChatMessage, ChatMessageEvent, ChatMessageEventProps, ChatState, ClientView, CloudRecordingState, ConnectionMonitorStart, ConnectionMonitorState, ConnectionStatus, DeviceCredentialsState, LiveTranscriptionState, LocalMediaOptions, LocalMediaState, LocalParticipantState, LocalScreenshareState, Notification, NotificationEvent, NotificationEventMap, NotificationEvents, NotificationsEventEmitter, NotificationsState, OrganizationState, RemoteParticipantSliceState, RequestAudioEvent, RequestAudioEventProps, RequestVideoEvent, RequestVideoEventProps, RoomConnectionState, RoomState, RootState, RtcConnectionState, SignalClientEvent, SignalClientEventProps, SignalConnectionState, SignalStatusEvent, SignalStatusEventProps, SpotlightsState, StickyReactionEvent, StickyReactionEventProps, Store, StreamingState, ThunkConfig, WaitingParticipantsState, rtcAnalyticsState };
@@ -5,7 +5,7 @@ import { AxiosRequestConfig } from 'axios';
5
5
  import { EventEmitter } from 'events';
6
6
  import * as redux from 'redux';
7
7
  import * as _whereby_com_media from '@whereby.com/media';
8
- import { RoleName, ChatMessage as ChatMessage$1, BreakoutConfig, getDeviceData, SignalClient, RtcStreamAddedPayload, AudioEnableRequest, VideoEnableRequest, RtcManagerCreatedPayload, RtcClientConnectionStatusChangedPayload, RtcManager, RtcManagerDispatcher, RtcEvents, AudioEnabledEvent, AudioEnableRequestedEvent, BreakoutGroupJoinedEvent, BreakoutSessionUpdatedEvent, ClientLeftEvent, ClientKickedEvent, ClientMetadataReceivedEvent, ClientUnableToJoinEvent, CloudRecordingStartedEvent, KnockerLeftEvent, KnockAcceptedEvent, KnockRejectedEvent, NewClientEvent, RoomJoinedEvent, RoomKnockedEvent, RoomLockedEvent, RoomSessionEndedEvent, ScreenshareStartedEvent, ScreenshareStoppedEvent, SpotlightAddedEvent, SpotlightRemovedEvent, VideoEnabledEvent, VideoEnableRequestedEvent, LiveTranscriptionStartedEvent, LiveTranscriptionStoppedEvent, ServerSocket, Spotlight } from '@whereby.com/media';
8
+ import { RoleName, ChatMessage as ChatMessage$1, BreakoutConfig, getDeviceData, SignalClient, RtcStreamAddedPayload, AudioEnableRequest, VideoEnableRequest, RtcManagerCreatedPayload, RtcClientConnectionStatusChangedPayload, RtcManager, RtcManagerDispatcher, RtcEvents, AudioEnabledEvent, AudioEnableRequestedEvent, BreakoutGroupJoinedEvent, BreakoutSessionUpdatedEvent, ChatMessageRemoved, ClientLeftEvent, ClientKickedEvent, ClientMetadataReceivedEvent, ClientUnableToJoinEvent, CloudRecordingStartedEvent, KnockerLeftEvent, KnockAcceptedEvent, KnockRejectedEvent, NewClientEvent, RoomJoinedEvent, RoomKnockedEvent, RoomLockedEvent, RoomSessionEndedEvent, ScreenshareStartedEvent, ScreenshareStoppedEvent, SpotlightAddedEvent, SpotlightRemovedEvent, VideoEnabledEvent, VideoEnableRequestedEvent, LiveTranscriptionStartedEvent, LiveTranscriptionStoppedEvent, ServerSocket, Spotlight } from '@whereby.com/media';
9
9
  import * as immer from 'immer';
10
10
  import * as reselect from 'reselect';
11
11
  import { Setup, Params } from '@whereby.com/camera-effects';
@@ -445,7 +445,9 @@ declare const updateReportedValues: ActionCreatorWithPayload<{
445
445
  value: unknown;
446
446
  }, "rtcAnalytics/updateReportedValues">;
447
447
 
448
- type ChatMessage = Pick<ChatMessage$1, "senderId" | "timestamp" | "text">;
448
+ type ChatMessage = Pick<ChatMessage$1, "id" | "senderId" | "parentId" | "timestamp" | "text" | "sig"> & {
449
+ removed: boolean;
450
+ };
449
451
  interface ChatState {
450
452
  chatMessages: ChatMessage[];
451
453
  }
@@ -454,7 +456,9 @@ declare const chatSlice: _reduxjs_toolkit.Slice<ChatState, {}, "chat", "chat", _
454
456
  declare const doSendChatMessage: (args: {
455
457
  text: string;
456
458
  isBroadcast?: boolean;
459
+ parentId?: string;
457
460
  }) => AppThunk;
461
+ declare const doRemoveChatMessage: (args: Pick<ChatMessage$1, "id" | "sig">) => AppThunk;
458
462
  declare const selectChatRaw: (state: RootState) => ChatState;
459
463
  declare const selectChatMessages: (state: RootState) => ChatMessage[];
460
464
 
@@ -4180,6 +4184,7 @@ declare const signalEvents: {
4180
4184
  breakoutMoveToMain: _reduxjs_toolkit.ActionCreatorWithoutPayload<string>;
4181
4185
  breakoutSessionUpdated: _reduxjs_toolkit.ActionCreatorWithPayload<BreakoutSessionUpdatedEvent, string>;
4182
4186
  chatMessage: _reduxjs_toolkit.ActionCreatorWithPayload<ChatMessage$1, string>;
4187
+ chatMessageRemoved: _reduxjs_toolkit.ActionCreatorWithPayload<ChatMessageRemoved, string>;
4183
4188
  clientLeft: _reduxjs_toolkit.ActionCreatorWithPayload<ClientLeftEvent, string>;
4184
4189
  clientKicked: _reduxjs_toolkit.ActionCreatorWithPayload<ClientKickedEvent, string>;
4185
4190
  clientMetadataReceived: _reduxjs_toolkit.ActionCreatorWithPayload<ClientMetadataReceivedEvent, string>;
@@ -4966,5 +4971,5 @@ declare const selectRoomConnectionSessionId: (state: RootState) => string | unde
4966
4971
  declare const selectRoomConnectionStatus: (state: RootState) => ConnectionStatus;
4967
4972
  declare const selectRoomConnectionError: (state: RootState) => string | null;
4968
4973
 
4969
- export { addAppListener, addSpotlight, appSlice, authorizationSlice, authorizationSliceInitialState, breakoutSlice, breakoutSliceInitialState, chatSlice, chatSliceInitialState, cloudRecordingSlice, connectionMonitorSlice, connectionMonitorSliceInitialState, connectionMonitorStarted, connectionMonitorStopped, createAppAsyncThunk, createAppAuthorizedThunk, createAppThunk, createAsyncRoomConnectedThunk, createAuthorizedRoomConnectedThunk, createReactor, createRemoteParticipant, createRoomConnectedThunk, createServices, createStore, createWebRtcEmitter, deviceBusy, deviceCredentialsSlice, deviceCredentialsSliceInitialState, deviceIdentified, deviceIdentifying, doAcceptWaitingParticipant, doAppStart, doAppStop, doBreakoutJoin, doCancelKnock, doClearNotifications, doConnectRoom, doConnectRtc, doDisconnectRtc, doEnableAudio, doEnableVideo, doEndMeeting, doGetDeviceCredentials, doHandleAcceptStreams, doHandleStreamingStarted, doHandleStreamingStopped, doKickParticipant, doKnockRoom, doLocalStreamEffect, doLockRoom, doOrganizationFetch, doRejectWaitingParticipant, doRemoveSpotlight, doRequestAudioEnable, doRequestVideoEnable, doRtcAnalyticsCustomEventsInitialize, doRtcManagerCreated, doRtcManagerInitialize, doRtcReportStreamResolution, doSendChatMessage, doSendClientMetadata, doSetDevice, doSetDisplayName, doSetLocalStickyReaction, doSetNotification, doSignalConnect, doSignalDisconnect, doSignalIdentifyDevice, doSpotlightParticipant, doStartCloudRecording, doStartConnectionMonitor, doStartLiveTranscription, doStartLocalMedia, doStartScreenshare, doStopCloudRecording, doStopConnectionMonitor, doStopLiveTranscription, doStopLocalMedia, doStopScreenshare, doSwitchLocalStream, doToggleCamera, doToggleLowDataMode, doUpdateDeviceList, initialCloudRecordingState, initialLiveTranscriptionState, initialLocalMediaState, initialNotificationsState, initialState, isAcceptingStreams, isClientSpotlighted, listenerMiddleware, liveTranscriptionSlice, localMediaSlice, localMediaStopped, localParticipantSlice, localParticipantSliceInitialState, localScreenshareSlice, localScreenshareSliceInitialState, localStreamMetadataUpdated, notificationsSlice, observeStore, organizationSlice, organizationSliceInitialState, participantStreamAdded, participantStreamIdAdded, recordingRequestStarted, remoteParticipantsSlice, remoteParticipantsSliceInitialState, removeSpotlight, resolutionReported, roomConnectionSlice, roomConnectionSliceInitialState, roomSlice, roomSliceInitialState, rootReducer, rtcAnalyticsCustomEvents, rtcAnalyticsSlice, rtcAnalyticsSliceInitialState, rtcClientConnectionStatusChanged, rtcConnectionSlice, rtcConnectionSliceInitialState, rtcDisconnected, rtcDispatcherCreated, rtcEvents, rtcManagerCreated, rtcManagerDestroyed, rtcManagerInitialized, selectAllClientViews, selectAllClientViewsInCurrentGroup, selectAppDisplayName, selectAppExternalId, selectAppIgnoreBreakoutGroups, selectAppInitialConfig, selectAppIsActive, selectAppIsAssistant, selectAppIsAudioRecorder, selectAppIsDialIn, selectAppIsNodeSdk, selectAppRaw, selectAppRoomName, selectAppRoomUrl, selectAppUserAgent, selectAssistantKey, selectAuthorizationRoleName, selectBreakoutActive, selectBreakoutAssignments, selectBreakoutCurrentGroup, selectBreakoutCurrentId, selectBreakoutGroupedParticipants, selectBreakoutGroups, selectBreakoutInitiatedBy, selectBreakoutRaw, selectBusyDeviceIds, selectCameraDeviceError, selectCameraDevices, selectChatMessages, selectChatRaw, selectCloudRecordingError, selectCloudRecordingIsInitiator, selectCloudRecordingRaw, selectCloudRecordingStartedAt, selectCloudRecordingStatus, selectConnectionMonitorIsRunning, selectCurrentCameraDeviceId, selectCurrentMicrophoneDeviceId, selectCurrentSpeakerDeviceId, selectDeviceCredentialsRaw, selectDeviceId, selectHasFetchedDeviceCredentials, selectIsAcceptingStreams, selectIsAuthorizedToAskToSpeak, selectIsAuthorizedToEndMeeting, selectIsAuthorizedToKickClient, selectIsAuthorizedToLockRoom, selectIsAuthorizedToRequestAudioEnable, selectIsAuthorizedToRequestVideoEnable, selectIsAuthorizedToSpotlight, selectIsCameraEnabled, selectIsCloudRecording, selectIsLiveTranscription, selectIsLocalMediaStarting, selectIsLocalParticipantSpotlighted, selectIsLowDataModeEnabled, selectIsMicrophoneEnabled, selectIsSettingCameraDevice, selectIsSettingMicrophoneDevice, selectIsToggleCamera, selectLiveTranscriptionError, selectLiveTranscriptionIsInitiator, selectLiveTranscriptionRaw, selectLiveTranscriptionStartedAt, selectLiveTranscriptionStatus, selectLocalMediaBeforeEffectTracks, selectLocalMediaConstraintsOptions, selectLocalMediaDevices, selectLocalMediaIsSwitchingStream, selectLocalMediaOptions, selectLocalMediaOwnsStream, selectLocalMediaRaw, selectLocalMediaShouldStartWithOptions, selectLocalMediaShouldStop, selectLocalMediaStartError, selectLocalMediaStatus, selectLocalMediaStream, selectLocalParticipantBreakoutAssigned, selectLocalParticipantBreakoutGroup, selectLocalParticipantClientClaim, selectLocalParticipantDisplayName, selectLocalParticipantIsScreenSharing, selectLocalParticipantRaw, selectLocalParticipantStickyReaction, selectLocalParticipantView, selectLocalScreenshareRaw, selectLocalScreenshareStatus, selectLocalScreenshareStream, selectMicrophoneDeviceError, selectMicrophoneDevices, selectNotificationsEmitter, selectNotificationsEvents, selectNotificationsRaw, selectNumClients, selectNumParticipants, selectOrganizationId, selectOrganizationPreferences, selectOrganizationRaw, selectRemoteClientViews, selectRemoteClients, selectRemoteParticipants, selectRemoteParticipantsRaw, selectRoomConnectionError, selectRoomConnectionRaw, selectRoomConnectionSession, selectRoomConnectionSessionId, selectRoomConnectionStatus, selectRoomIsLocked, selectRoomKey, selectRtcConnectionRaw, selectRtcDispatcherCreated, selectRtcIsCreatingDispatcher, selectRtcManager, selectRtcManagerInitialized, selectRtcStatus, selectScreenshares, selectSelfId, selectShouldConnectRoom, selectShouldConnectRtc, selectShouldConnectSignal, selectShouldDisconnectRtc, selectShouldFetchDeviceCredentials, selectShouldFetchOrganization, selectShouldIdentifyDevice, selectShouldInitializeRtc, selectShouldStartConnectionMonitor, selectShouldStopConnectionMonitor, selectSignalConnectionDeviceIdentified, selectSignalConnectionRaw, selectSignalConnectionSocket, selectSignalIsIdentifyingDevice, selectSignalStatus, selectSpeakerDevices, selectSpotlightedClientViews, selectSpotlights, selectSpotlightsRaw, selectStopCallbackFunction, selectStreamingRaw, selectStreamsToAccept, selectWaitingParticipants, selectWaitingParticipantsRaw, setBreakoutGroupAssigned, setCurrentCameraDeviceId, setCurrentMicrophoneDeviceId, setCurrentSpeakerDeviceId, setDisplayName, setLocalMediaOptions, setLocalMediaStream, setRoomKey, signalConnectionSlice, signalConnectionSliceInitialState, signalEvents, socketConnected, socketConnecting, socketDisconnected, socketReconnecting, spotlightsSlice, spotlightsSliceInitialState, startAppListening, stopScreenshare, streamIdForClient, streamStatusUpdated, streamingSlice, streamingSliceInitialState, toggleCameraEnabled, toggleLowDataModeEnabled, toggleMicrophoneEnabled, transcribingRequestStarted, updateReportedValues, waitingParticipantsSlice, waitingParticipantsSliceInitialState };
4974
+ export { addAppListener, addSpotlight, appSlice, authorizationSlice, authorizationSliceInitialState, breakoutSlice, breakoutSliceInitialState, chatSlice, chatSliceInitialState, cloudRecordingSlice, connectionMonitorSlice, connectionMonitorSliceInitialState, connectionMonitorStarted, connectionMonitorStopped, createAppAsyncThunk, createAppAuthorizedThunk, createAppThunk, createAsyncRoomConnectedThunk, createAuthorizedRoomConnectedThunk, createReactor, createRemoteParticipant, createRoomConnectedThunk, createServices, createStore, createWebRtcEmitter, deviceBusy, deviceCredentialsSlice, deviceCredentialsSliceInitialState, deviceIdentified, deviceIdentifying, doAcceptWaitingParticipant, doAppStart, doAppStop, doBreakoutJoin, doCancelKnock, doClearNotifications, doConnectRoom, doConnectRtc, doDisconnectRtc, doEnableAudio, doEnableVideo, doEndMeeting, doGetDeviceCredentials, doHandleAcceptStreams, doHandleStreamingStarted, doHandleStreamingStopped, doKickParticipant, doKnockRoom, doLocalStreamEffect, doLockRoom, doOrganizationFetch, doRejectWaitingParticipant, doRemoveChatMessage, doRemoveSpotlight, doRequestAudioEnable, doRequestVideoEnable, doRtcAnalyticsCustomEventsInitialize, doRtcManagerCreated, doRtcManagerInitialize, doRtcReportStreamResolution, doSendChatMessage, doSendClientMetadata, doSetDevice, doSetDisplayName, doSetLocalStickyReaction, doSetNotification, doSignalConnect, doSignalDisconnect, doSignalIdentifyDevice, doSpotlightParticipant, doStartCloudRecording, doStartConnectionMonitor, doStartLiveTranscription, doStartLocalMedia, doStartScreenshare, doStopCloudRecording, doStopConnectionMonitor, doStopLiveTranscription, doStopLocalMedia, doStopScreenshare, doSwitchLocalStream, doToggleCamera, doToggleLowDataMode, doUpdateDeviceList, initialCloudRecordingState, initialLiveTranscriptionState, initialLocalMediaState, initialNotificationsState, initialState, isAcceptingStreams, isClientSpotlighted, listenerMiddleware, liveTranscriptionSlice, localMediaSlice, localMediaStopped, localParticipantSlice, localParticipantSliceInitialState, localScreenshareSlice, localScreenshareSliceInitialState, localStreamMetadataUpdated, notificationsSlice, observeStore, organizationSlice, organizationSliceInitialState, participantStreamAdded, participantStreamIdAdded, recordingRequestStarted, remoteParticipantsSlice, remoteParticipantsSliceInitialState, removeSpotlight, resolutionReported, roomConnectionSlice, roomConnectionSliceInitialState, roomSlice, roomSliceInitialState, rootReducer, rtcAnalyticsCustomEvents, rtcAnalyticsSlice, rtcAnalyticsSliceInitialState, rtcClientConnectionStatusChanged, rtcConnectionSlice, rtcConnectionSliceInitialState, rtcDisconnected, rtcDispatcherCreated, rtcEvents, rtcManagerCreated, rtcManagerDestroyed, rtcManagerInitialized, selectAllClientViews, selectAllClientViewsInCurrentGroup, selectAppDisplayName, selectAppExternalId, selectAppIgnoreBreakoutGroups, selectAppInitialConfig, selectAppIsActive, selectAppIsAssistant, selectAppIsAudioRecorder, selectAppIsDialIn, selectAppIsNodeSdk, selectAppRaw, selectAppRoomName, selectAppRoomUrl, selectAppUserAgent, selectAssistantKey, selectAuthorizationRoleName, selectBreakoutActive, selectBreakoutAssignments, selectBreakoutCurrentGroup, selectBreakoutCurrentId, selectBreakoutGroupedParticipants, selectBreakoutGroups, selectBreakoutInitiatedBy, selectBreakoutRaw, selectBusyDeviceIds, selectCameraDeviceError, selectCameraDevices, selectChatMessages, selectChatRaw, selectCloudRecordingError, selectCloudRecordingIsInitiator, selectCloudRecordingRaw, selectCloudRecordingStartedAt, selectCloudRecordingStatus, selectConnectionMonitorIsRunning, selectCurrentCameraDeviceId, selectCurrentMicrophoneDeviceId, selectCurrentSpeakerDeviceId, selectDeviceCredentialsRaw, selectDeviceId, selectHasFetchedDeviceCredentials, selectIsAcceptingStreams, selectIsAuthorizedToAskToSpeak, selectIsAuthorizedToEndMeeting, selectIsAuthorizedToKickClient, selectIsAuthorizedToLockRoom, selectIsAuthorizedToRequestAudioEnable, selectIsAuthorizedToRequestVideoEnable, selectIsAuthorizedToSpotlight, selectIsCameraEnabled, selectIsCloudRecording, selectIsLiveTranscription, selectIsLocalMediaStarting, selectIsLocalParticipantSpotlighted, selectIsLowDataModeEnabled, selectIsMicrophoneEnabled, selectIsSettingCameraDevice, selectIsSettingMicrophoneDevice, selectIsToggleCamera, selectLiveTranscriptionError, selectLiveTranscriptionIsInitiator, selectLiveTranscriptionRaw, selectLiveTranscriptionStartedAt, selectLiveTranscriptionStatus, selectLocalMediaBeforeEffectTracks, selectLocalMediaConstraintsOptions, selectLocalMediaDevices, selectLocalMediaIsSwitchingStream, selectLocalMediaOptions, selectLocalMediaOwnsStream, selectLocalMediaRaw, selectLocalMediaShouldStartWithOptions, selectLocalMediaShouldStop, selectLocalMediaStartError, selectLocalMediaStatus, selectLocalMediaStream, selectLocalParticipantBreakoutAssigned, selectLocalParticipantBreakoutGroup, selectLocalParticipantClientClaim, selectLocalParticipantDisplayName, selectLocalParticipantIsScreenSharing, selectLocalParticipantRaw, selectLocalParticipantStickyReaction, selectLocalParticipantView, selectLocalScreenshareRaw, selectLocalScreenshareStatus, selectLocalScreenshareStream, selectMicrophoneDeviceError, selectMicrophoneDevices, selectNotificationsEmitter, selectNotificationsEvents, selectNotificationsRaw, selectNumClients, selectNumParticipants, selectOrganizationId, selectOrganizationPreferences, selectOrganizationRaw, selectRemoteClientViews, selectRemoteClients, selectRemoteParticipants, selectRemoteParticipantsRaw, selectRoomConnectionError, selectRoomConnectionRaw, selectRoomConnectionSession, selectRoomConnectionSessionId, selectRoomConnectionStatus, selectRoomIsLocked, selectRoomKey, selectRtcConnectionRaw, selectRtcDispatcherCreated, selectRtcIsCreatingDispatcher, selectRtcManager, selectRtcManagerInitialized, selectRtcStatus, selectScreenshares, selectSelfId, selectShouldConnectRoom, selectShouldConnectRtc, selectShouldConnectSignal, selectShouldDisconnectRtc, selectShouldFetchDeviceCredentials, selectShouldFetchOrganization, selectShouldIdentifyDevice, selectShouldInitializeRtc, selectShouldStartConnectionMonitor, selectShouldStopConnectionMonitor, selectSignalConnectionDeviceIdentified, selectSignalConnectionRaw, selectSignalConnectionSocket, selectSignalIsIdentifyingDevice, selectSignalStatus, selectSpeakerDevices, selectSpotlightedClientViews, selectSpotlights, selectSpotlightsRaw, selectStopCallbackFunction, selectStreamingRaw, selectStreamsToAccept, selectWaitingParticipants, selectWaitingParticipantsRaw, setBreakoutGroupAssigned, setCurrentCameraDeviceId, setCurrentMicrophoneDeviceId, setCurrentSpeakerDeviceId, setDisplayName, setLocalMediaOptions, setLocalMediaStream, setRoomKey, signalConnectionSlice, signalConnectionSliceInitialState, signalEvents, socketConnected, socketConnecting, socketDisconnected, socketReconnecting, spotlightsSlice, spotlightsSliceInitialState, startAppListening, stopScreenshare, streamIdForClient, streamStatusUpdated, streamingSlice, streamingSliceInitialState, toggleCameraEnabled, toggleLowDataModeEnabled, toggleMicrophoneEnabled, transcribingRequestStarted, updateReportedValues, waitingParticipantsSlice, waitingParticipantsSliceInitialState };
4970
4975
  export type { AppConfig, AppDispatch, AppReducer, AppStartListening, AppState, AppThunk, AuthorizationState, BreakoutState, ChatMessage, ChatMessageEvent, ChatMessageEventProps, ChatState, ClientView, CloudRecordingState, ConnectionMonitorStart, ConnectionMonitorState, ConnectionStatus, DeviceCredentialsState, LiveTranscriptionState, LocalMediaOptions, LocalMediaState, LocalParticipantState, LocalScreenshareState, Notification, NotificationEvent, NotificationEventMap, NotificationEvents, NotificationsEventEmitter, NotificationsState, OrganizationState, RemoteParticipantSliceState, RequestAudioEvent, RequestAudioEventProps, RequestVideoEvent, RequestVideoEventProps, RoomConnectionState, RoomState, RootState, RtcConnectionState, SignalClientEvent, SignalClientEventProps, SignalConnectionState, SignalStatusEvent, SignalStatusEventProps, SpotlightsState, StickyReactionEvent, StickyReactionEventProps, Store, StreamingState, ThunkConfig, WaitingParticipantsState, rtcAnalyticsState };
@@ -5,7 +5,7 @@ import { AxiosRequestConfig } from 'axios';
5
5
  import { EventEmitter } from 'events';
6
6
  import * as redux from 'redux';
7
7
  import * as _whereby_com_media from '@whereby.com/media';
8
- import { RoleName, ChatMessage as ChatMessage$1, BreakoutConfig, getDeviceData, SignalClient, RtcStreamAddedPayload, AudioEnableRequest, VideoEnableRequest, RtcManagerCreatedPayload, RtcClientConnectionStatusChangedPayload, RtcManager, RtcManagerDispatcher, RtcEvents, AudioEnabledEvent, AudioEnableRequestedEvent, BreakoutGroupJoinedEvent, BreakoutSessionUpdatedEvent, ClientLeftEvent, ClientKickedEvent, ClientMetadataReceivedEvent, ClientUnableToJoinEvent, CloudRecordingStartedEvent, KnockerLeftEvent, KnockAcceptedEvent, KnockRejectedEvent, NewClientEvent, RoomJoinedEvent, RoomKnockedEvent, RoomLockedEvent, RoomSessionEndedEvent, ScreenshareStartedEvent, ScreenshareStoppedEvent, SpotlightAddedEvent, SpotlightRemovedEvent, VideoEnabledEvent, VideoEnableRequestedEvent, LiveTranscriptionStartedEvent, LiveTranscriptionStoppedEvent, ServerSocket, Spotlight } from '@whereby.com/media';
8
+ import { RoleName, ChatMessage as ChatMessage$1, BreakoutConfig, getDeviceData, SignalClient, RtcStreamAddedPayload, AudioEnableRequest, VideoEnableRequest, RtcManagerCreatedPayload, RtcClientConnectionStatusChangedPayload, RtcManager, RtcManagerDispatcher, RtcEvents, AudioEnabledEvent, AudioEnableRequestedEvent, BreakoutGroupJoinedEvent, BreakoutSessionUpdatedEvent, ChatMessageRemoved, ClientLeftEvent, ClientKickedEvent, ClientMetadataReceivedEvent, ClientUnableToJoinEvent, CloudRecordingStartedEvent, KnockerLeftEvent, KnockAcceptedEvent, KnockRejectedEvent, NewClientEvent, RoomJoinedEvent, RoomKnockedEvent, RoomLockedEvent, RoomSessionEndedEvent, ScreenshareStartedEvent, ScreenshareStoppedEvent, SpotlightAddedEvent, SpotlightRemovedEvent, VideoEnabledEvent, VideoEnableRequestedEvent, LiveTranscriptionStartedEvent, LiveTranscriptionStoppedEvent, ServerSocket, Spotlight } from '@whereby.com/media';
9
9
  import * as immer from 'immer';
10
10
  import * as reselect from 'reselect';
11
11
  import { Setup, Params } from '@whereby.com/camera-effects';
@@ -445,7 +445,9 @@ declare const updateReportedValues: ActionCreatorWithPayload<{
445
445
  value: unknown;
446
446
  }, "rtcAnalytics/updateReportedValues">;
447
447
 
448
- type ChatMessage = Pick<ChatMessage$1, "senderId" | "timestamp" | "text">;
448
+ type ChatMessage = Pick<ChatMessage$1, "id" | "senderId" | "parentId" | "timestamp" | "text" | "sig"> & {
449
+ removed: boolean;
450
+ };
449
451
  interface ChatState {
450
452
  chatMessages: ChatMessage[];
451
453
  }
@@ -454,7 +456,9 @@ declare const chatSlice: _reduxjs_toolkit.Slice<ChatState, {}, "chat", "chat", _
454
456
  declare const doSendChatMessage: (args: {
455
457
  text: string;
456
458
  isBroadcast?: boolean;
459
+ parentId?: string;
457
460
  }) => AppThunk;
461
+ declare const doRemoveChatMessage: (args: Pick<ChatMessage$1, "id" | "sig">) => AppThunk;
458
462
  declare const selectChatRaw: (state: RootState) => ChatState;
459
463
  declare const selectChatMessages: (state: RootState) => ChatMessage[];
460
464
 
@@ -4180,6 +4184,7 @@ declare const signalEvents: {
4180
4184
  breakoutMoveToMain: _reduxjs_toolkit.ActionCreatorWithoutPayload<string>;
4181
4185
  breakoutSessionUpdated: _reduxjs_toolkit.ActionCreatorWithPayload<BreakoutSessionUpdatedEvent, string>;
4182
4186
  chatMessage: _reduxjs_toolkit.ActionCreatorWithPayload<ChatMessage$1, string>;
4187
+ chatMessageRemoved: _reduxjs_toolkit.ActionCreatorWithPayload<ChatMessageRemoved, string>;
4183
4188
  clientLeft: _reduxjs_toolkit.ActionCreatorWithPayload<ClientLeftEvent, string>;
4184
4189
  clientKicked: _reduxjs_toolkit.ActionCreatorWithPayload<ClientKickedEvent, string>;
4185
4190
  clientMetadataReceived: _reduxjs_toolkit.ActionCreatorWithPayload<ClientMetadataReceivedEvent, string>;
@@ -4966,5 +4971,5 @@ declare const selectRoomConnectionSessionId: (state: RootState) => string | unde
4966
4971
  declare const selectRoomConnectionStatus: (state: RootState) => ConnectionStatus;
4967
4972
  declare const selectRoomConnectionError: (state: RootState) => string | null;
4968
4973
 
4969
- export { addAppListener, addSpotlight, appSlice, authorizationSlice, authorizationSliceInitialState, breakoutSlice, breakoutSliceInitialState, chatSlice, chatSliceInitialState, cloudRecordingSlice, connectionMonitorSlice, connectionMonitorSliceInitialState, connectionMonitorStarted, connectionMonitorStopped, createAppAsyncThunk, createAppAuthorizedThunk, createAppThunk, createAsyncRoomConnectedThunk, createAuthorizedRoomConnectedThunk, createReactor, createRemoteParticipant, createRoomConnectedThunk, createServices, createStore, createWebRtcEmitter, deviceBusy, deviceCredentialsSlice, deviceCredentialsSliceInitialState, deviceIdentified, deviceIdentifying, doAcceptWaitingParticipant, doAppStart, doAppStop, doBreakoutJoin, doCancelKnock, doClearNotifications, doConnectRoom, doConnectRtc, doDisconnectRtc, doEnableAudio, doEnableVideo, doEndMeeting, doGetDeviceCredentials, doHandleAcceptStreams, doHandleStreamingStarted, doHandleStreamingStopped, doKickParticipant, doKnockRoom, doLocalStreamEffect, doLockRoom, doOrganizationFetch, doRejectWaitingParticipant, doRemoveSpotlight, doRequestAudioEnable, doRequestVideoEnable, doRtcAnalyticsCustomEventsInitialize, doRtcManagerCreated, doRtcManagerInitialize, doRtcReportStreamResolution, doSendChatMessage, doSendClientMetadata, doSetDevice, doSetDisplayName, doSetLocalStickyReaction, doSetNotification, doSignalConnect, doSignalDisconnect, doSignalIdentifyDevice, doSpotlightParticipant, doStartCloudRecording, doStartConnectionMonitor, doStartLiveTranscription, doStartLocalMedia, doStartScreenshare, doStopCloudRecording, doStopConnectionMonitor, doStopLiveTranscription, doStopLocalMedia, doStopScreenshare, doSwitchLocalStream, doToggleCamera, doToggleLowDataMode, doUpdateDeviceList, initialCloudRecordingState, initialLiveTranscriptionState, initialLocalMediaState, initialNotificationsState, initialState, isAcceptingStreams, isClientSpotlighted, listenerMiddleware, liveTranscriptionSlice, localMediaSlice, localMediaStopped, localParticipantSlice, localParticipantSliceInitialState, localScreenshareSlice, localScreenshareSliceInitialState, localStreamMetadataUpdated, notificationsSlice, observeStore, organizationSlice, organizationSliceInitialState, participantStreamAdded, participantStreamIdAdded, recordingRequestStarted, remoteParticipantsSlice, remoteParticipantsSliceInitialState, removeSpotlight, resolutionReported, roomConnectionSlice, roomConnectionSliceInitialState, roomSlice, roomSliceInitialState, rootReducer, rtcAnalyticsCustomEvents, rtcAnalyticsSlice, rtcAnalyticsSliceInitialState, rtcClientConnectionStatusChanged, rtcConnectionSlice, rtcConnectionSliceInitialState, rtcDisconnected, rtcDispatcherCreated, rtcEvents, rtcManagerCreated, rtcManagerDestroyed, rtcManagerInitialized, selectAllClientViews, selectAllClientViewsInCurrentGroup, selectAppDisplayName, selectAppExternalId, selectAppIgnoreBreakoutGroups, selectAppInitialConfig, selectAppIsActive, selectAppIsAssistant, selectAppIsAudioRecorder, selectAppIsDialIn, selectAppIsNodeSdk, selectAppRaw, selectAppRoomName, selectAppRoomUrl, selectAppUserAgent, selectAssistantKey, selectAuthorizationRoleName, selectBreakoutActive, selectBreakoutAssignments, selectBreakoutCurrentGroup, selectBreakoutCurrentId, selectBreakoutGroupedParticipants, selectBreakoutGroups, selectBreakoutInitiatedBy, selectBreakoutRaw, selectBusyDeviceIds, selectCameraDeviceError, selectCameraDevices, selectChatMessages, selectChatRaw, selectCloudRecordingError, selectCloudRecordingIsInitiator, selectCloudRecordingRaw, selectCloudRecordingStartedAt, selectCloudRecordingStatus, selectConnectionMonitorIsRunning, selectCurrentCameraDeviceId, selectCurrentMicrophoneDeviceId, selectCurrentSpeakerDeviceId, selectDeviceCredentialsRaw, selectDeviceId, selectHasFetchedDeviceCredentials, selectIsAcceptingStreams, selectIsAuthorizedToAskToSpeak, selectIsAuthorizedToEndMeeting, selectIsAuthorizedToKickClient, selectIsAuthorizedToLockRoom, selectIsAuthorizedToRequestAudioEnable, selectIsAuthorizedToRequestVideoEnable, selectIsAuthorizedToSpotlight, selectIsCameraEnabled, selectIsCloudRecording, selectIsLiveTranscription, selectIsLocalMediaStarting, selectIsLocalParticipantSpotlighted, selectIsLowDataModeEnabled, selectIsMicrophoneEnabled, selectIsSettingCameraDevice, selectIsSettingMicrophoneDevice, selectIsToggleCamera, selectLiveTranscriptionError, selectLiveTranscriptionIsInitiator, selectLiveTranscriptionRaw, selectLiveTranscriptionStartedAt, selectLiveTranscriptionStatus, selectLocalMediaBeforeEffectTracks, selectLocalMediaConstraintsOptions, selectLocalMediaDevices, selectLocalMediaIsSwitchingStream, selectLocalMediaOptions, selectLocalMediaOwnsStream, selectLocalMediaRaw, selectLocalMediaShouldStartWithOptions, selectLocalMediaShouldStop, selectLocalMediaStartError, selectLocalMediaStatus, selectLocalMediaStream, selectLocalParticipantBreakoutAssigned, selectLocalParticipantBreakoutGroup, selectLocalParticipantClientClaim, selectLocalParticipantDisplayName, selectLocalParticipantIsScreenSharing, selectLocalParticipantRaw, selectLocalParticipantStickyReaction, selectLocalParticipantView, selectLocalScreenshareRaw, selectLocalScreenshareStatus, selectLocalScreenshareStream, selectMicrophoneDeviceError, selectMicrophoneDevices, selectNotificationsEmitter, selectNotificationsEvents, selectNotificationsRaw, selectNumClients, selectNumParticipants, selectOrganizationId, selectOrganizationPreferences, selectOrganizationRaw, selectRemoteClientViews, selectRemoteClients, selectRemoteParticipants, selectRemoteParticipantsRaw, selectRoomConnectionError, selectRoomConnectionRaw, selectRoomConnectionSession, selectRoomConnectionSessionId, selectRoomConnectionStatus, selectRoomIsLocked, selectRoomKey, selectRtcConnectionRaw, selectRtcDispatcherCreated, selectRtcIsCreatingDispatcher, selectRtcManager, selectRtcManagerInitialized, selectRtcStatus, selectScreenshares, selectSelfId, selectShouldConnectRoom, selectShouldConnectRtc, selectShouldConnectSignal, selectShouldDisconnectRtc, selectShouldFetchDeviceCredentials, selectShouldFetchOrganization, selectShouldIdentifyDevice, selectShouldInitializeRtc, selectShouldStartConnectionMonitor, selectShouldStopConnectionMonitor, selectSignalConnectionDeviceIdentified, selectSignalConnectionRaw, selectSignalConnectionSocket, selectSignalIsIdentifyingDevice, selectSignalStatus, selectSpeakerDevices, selectSpotlightedClientViews, selectSpotlights, selectSpotlightsRaw, selectStopCallbackFunction, selectStreamingRaw, selectStreamsToAccept, selectWaitingParticipants, selectWaitingParticipantsRaw, setBreakoutGroupAssigned, setCurrentCameraDeviceId, setCurrentMicrophoneDeviceId, setCurrentSpeakerDeviceId, setDisplayName, setLocalMediaOptions, setLocalMediaStream, setRoomKey, signalConnectionSlice, signalConnectionSliceInitialState, signalEvents, socketConnected, socketConnecting, socketDisconnected, socketReconnecting, spotlightsSlice, spotlightsSliceInitialState, startAppListening, stopScreenshare, streamIdForClient, streamStatusUpdated, streamingSlice, streamingSliceInitialState, toggleCameraEnabled, toggleLowDataModeEnabled, toggleMicrophoneEnabled, transcribingRequestStarted, updateReportedValues, waitingParticipantsSlice, waitingParticipantsSliceInitialState };
4974
+ export { addAppListener, addSpotlight, appSlice, authorizationSlice, authorizationSliceInitialState, breakoutSlice, breakoutSliceInitialState, chatSlice, chatSliceInitialState, cloudRecordingSlice, connectionMonitorSlice, connectionMonitorSliceInitialState, connectionMonitorStarted, connectionMonitorStopped, createAppAsyncThunk, createAppAuthorizedThunk, createAppThunk, createAsyncRoomConnectedThunk, createAuthorizedRoomConnectedThunk, createReactor, createRemoteParticipant, createRoomConnectedThunk, createServices, createStore, createWebRtcEmitter, deviceBusy, deviceCredentialsSlice, deviceCredentialsSliceInitialState, deviceIdentified, deviceIdentifying, doAcceptWaitingParticipant, doAppStart, doAppStop, doBreakoutJoin, doCancelKnock, doClearNotifications, doConnectRoom, doConnectRtc, doDisconnectRtc, doEnableAudio, doEnableVideo, doEndMeeting, doGetDeviceCredentials, doHandleAcceptStreams, doHandleStreamingStarted, doHandleStreamingStopped, doKickParticipant, doKnockRoom, doLocalStreamEffect, doLockRoom, doOrganizationFetch, doRejectWaitingParticipant, doRemoveChatMessage, doRemoveSpotlight, doRequestAudioEnable, doRequestVideoEnable, doRtcAnalyticsCustomEventsInitialize, doRtcManagerCreated, doRtcManagerInitialize, doRtcReportStreamResolution, doSendChatMessage, doSendClientMetadata, doSetDevice, doSetDisplayName, doSetLocalStickyReaction, doSetNotification, doSignalConnect, doSignalDisconnect, doSignalIdentifyDevice, doSpotlightParticipant, doStartCloudRecording, doStartConnectionMonitor, doStartLiveTranscription, doStartLocalMedia, doStartScreenshare, doStopCloudRecording, doStopConnectionMonitor, doStopLiveTranscription, doStopLocalMedia, doStopScreenshare, doSwitchLocalStream, doToggleCamera, doToggleLowDataMode, doUpdateDeviceList, initialCloudRecordingState, initialLiveTranscriptionState, initialLocalMediaState, initialNotificationsState, initialState, isAcceptingStreams, isClientSpotlighted, listenerMiddleware, liveTranscriptionSlice, localMediaSlice, localMediaStopped, localParticipantSlice, localParticipantSliceInitialState, localScreenshareSlice, localScreenshareSliceInitialState, localStreamMetadataUpdated, notificationsSlice, observeStore, organizationSlice, organizationSliceInitialState, participantStreamAdded, participantStreamIdAdded, recordingRequestStarted, remoteParticipantsSlice, remoteParticipantsSliceInitialState, removeSpotlight, resolutionReported, roomConnectionSlice, roomConnectionSliceInitialState, roomSlice, roomSliceInitialState, rootReducer, rtcAnalyticsCustomEvents, rtcAnalyticsSlice, rtcAnalyticsSliceInitialState, rtcClientConnectionStatusChanged, rtcConnectionSlice, rtcConnectionSliceInitialState, rtcDisconnected, rtcDispatcherCreated, rtcEvents, rtcManagerCreated, rtcManagerDestroyed, rtcManagerInitialized, selectAllClientViews, selectAllClientViewsInCurrentGroup, selectAppDisplayName, selectAppExternalId, selectAppIgnoreBreakoutGroups, selectAppInitialConfig, selectAppIsActive, selectAppIsAssistant, selectAppIsAudioRecorder, selectAppIsDialIn, selectAppIsNodeSdk, selectAppRaw, selectAppRoomName, selectAppRoomUrl, selectAppUserAgent, selectAssistantKey, selectAuthorizationRoleName, selectBreakoutActive, selectBreakoutAssignments, selectBreakoutCurrentGroup, selectBreakoutCurrentId, selectBreakoutGroupedParticipants, selectBreakoutGroups, selectBreakoutInitiatedBy, selectBreakoutRaw, selectBusyDeviceIds, selectCameraDeviceError, selectCameraDevices, selectChatMessages, selectChatRaw, selectCloudRecordingError, selectCloudRecordingIsInitiator, selectCloudRecordingRaw, selectCloudRecordingStartedAt, selectCloudRecordingStatus, selectConnectionMonitorIsRunning, selectCurrentCameraDeviceId, selectCurrentMicrophoneDeviceId, selectCurrentSpeakerDeviceId, selectDeviceCredentialsRaw, selectDeviceId, selectHasFetchedDeviceCredentials, selectIsAcceptingStreams, selectIsAuthorizedToAskToSpeak, selectIsAuthorizedToEndMeeting, selectIsAuthorizedToKickClient, selectIsAuthorizedToLockRoom, selectIsAuthorizedToRequestAudioEnable, selectIsAuthorizedToRequestVideoEnable, selectIsAuthorizedToSpotlight, selectIsCameraEnabled, selectIsCloudRecording, selectIsLiveTranscription, selectIsLocalMediaStarting, selectIsLocalParticipantSpotlighted, selectIsLowDataModeEnabled, selectIsMicrophoneEnabled, selectIsSettingCameraDevice, selectIsSettingMicrophoneDevice, selectIsToggleCamera, selectLiveTranscriptionError, selectLiveTranscriptionIsInitiator, selectLiveTranscriptionRaw, selectLiveTranscriptionStartedAt, selectLiveTranscriptionStatus, selectLocalMediaBeforeEffectTracks, selectLocalMediaConstraintsOptions, selectLocalMediaDevices, selectLocalMediaIsSwitchingStream, selectLocalMediaOptions, selectLocalMediaOwnsStream, selectLocalMediaRaw, selectLocalMediaShouldStartWithOptions, selectLocalMediaShouldStop, selectLocalMediaStartError, selectLocalMediaStatus, selectLocalMediaStream, selectLocalParticipantBreakoutAssigned, selectLocalParticipantBreakoutGroup, selectLocalParticipantClientClaim, selectLocalParticipantDisplayName, selectLocalParticipantIsScreenSharing, selectLocalParticipantRaw, selectLocalParticipantStickyReaction, selectLocalParticipantView, selectLocalScreenshareRaw, selectLocalScreenshareStatus, selectLocalScreenshareStream, selectMicrophoneDeviceError, selectMicrophoneDevices, selectNotificationsEmitter, selectNotificationsEvents, selectNotificationsRaw, selectNumClients, selectNumParticipants, selectOrganizationId, selectOrganizationPreferences, selectOrganizationRaw, selectRemoteClientViews, selectRemoteClients, selectRemoteParticipants, selectRemoteParticipantsRaw, selectRoomConnectionError, selectRoomConnectionRaw, selectRoomConnectionSession, selectRoomConnectionSessionId, selectRoomConnectionStatus, selectRoomIsLocked, selectRoomKey, selectRtcConnectionRaw, selectRtcDispatcherCreated, selectRtcIsCreatingDispatcher, selectRtcManager, selectRtcManagerInitialized, selectRtcStatus, selectScreenshares, selectSelfId, selectShouldConnectRoom, selectShouldConnectRtc, selectShouldConnectSignal, selectShouldDisconnectRtc, selectShouldFetchDeviceCredentials, selectShouldFetchOrganization, selectShouldIdentifyDevice, selectShouldInitializeRtc, selectShouldStartConnectionMonitor, selectShouldStopConnectionMonitor, selectSignalConnectionDeviceIdentified, selectSignalConnectionRaw, selectSignalConnectionSocket, selectSignalIsIdentifyingDevice, selectSignalStatus, selectSpeakerDevices, selectSpotlightedClientViews, selectSpotlights, selectSpotlightsRaw, selectStopCallbackFunction, selectStreamingRaw, selectStreamsToAccept, selectWaitingParticipants, selectWaitingParticipantsRaw, setBreakoutGroupAssigned, setCurrentCameraDeviceId, setCurrentMicrophoneDeviceId, setCurrentSpeakerDeviceId, setDisplayName, setLocalMediaOptions, setLocalMediaStream, setRoomKey, signalConnectionSlice, signalConnectionSliceInitialState, signalEvents, socketConnected, socketConnecting, socketDisconnected, socketReconnecting, spotlightsSlice, spotlightsSliceInitialState, startAppListening, stopScreenshare, streamIdForClient, streamStatusUpdated, streamingSlice, streamingSliceInitialState, toggleCameraEnabled, toggleLowDataModeEnabled, toggleMicrophoneEnabled, transcribingRequestStarted, updateReportedValues, waitingParticipantsSlice, waitingParticipantsSliceInitialState };
4970
4975
  export type { AppConfig, AppDispatch, AppReducer, AppStartListening, AppState, AppThunk, AuthorizationState, BreakoutState, ChatMessage, ChatMessageEvent, ChatMessageEventProps, ChatState, ClientView, CloudRecordingState, ConnectionMonitorStart, ConnectionMonitorState, ConnectionStatus, DeviceCredentialsState, LiveTranscriptionState, LocalMediaOptions, LocalMediaState, LocalParticipantState, LocalScreenshareState, Notification, NotificationEvent, NotificationEventMap, NotificationEvents, NotificationsEventEmitter, NotificationsState, OrganizationState, RemoteParticipantSliceState, RequestAudioEvent, RequestAudioEventProps, RequestVideoEvent, RequestVideoEventProps, RoomConnectionState, RoomState, RootState, RtcConnectionState, SignalClientEvent, SignalClientEventProps, SignalConnectionState, SignalStatusEvent, SignalStatusEventProps, SpotlightsState, StickyReactionEvent, StickyReactionEventProps, Store, StreamingState, ThunkConfig, WaitingParticipantsState, rtcAnalyticsState };
@@ -73,7 +73,7 @@ const createReactor = (selectors, callback) => {
73
73
  });
74
74
  };
75
75
 
76
- const coreVersion = "1.10.19";
76
+ const coreVersion = "1.11.0";
77
77
 
78
78
  const initialState$1 = {
79
79
  displayName: null,
@@ -127,6 +127,7 @@ const signalEvents = {
127
127
  breakoutMoveToMain: createSignalEventAction("breakoutMoveToMain"),
128
128
  breakoutSessionUpdated: createSignalEventAction("breakoutSessionUpdated"),
129
129
  chatMessage: createSignalEventAction("chatMessage"),
130
+ chatMessageRemoved: createSignalEventAction("chatMessageRemoved"),
130
131
  clientLeft: createSignalEventAction("clientLeft"),
131
132
  clientKicked: createSignalEventAction("clientKicked"),
132
133
  clientMetadataReceived: createSignalEventAction("clientMetadataReceived"),
@@ -305,6 +306,7 @@ function forwardSocketEvents(socket, dispatch) {
305
306
  socket.on("audio_enable_requested", (payload) => dispatch(signalEvents.audioEnableRequested(payload)));
306
307
  socket.on("client_metadata_received", (payload) => dispatch(signalEvents.clientMetadataReceived(payload)));
307
308
  socket.on("chat_message", (payload) => dispatch(signalEvents.chatMessage(payload)));
309
+ socket.on("chat_message_removed", (payload) => dispatch(signalEvents.chatMessageRemoved(payload)));
308
310
  socket.on("disconnect", () => dispatch(signalEvents.disconnect()));
309
311
  socket.on("room_knocked", (payload) => dispatch(signalEvents.roomKnocked(payload)));
310
312
  socket.on("room_left", () => dispatch(signalEvents.roomLeft()));
@@ -1134,19 +1136,38 @@ const chatSlice = createSlice({
1134
1136
  extraReducers(builder) {
1135
1137
  builder.addCase(signalEvents.chatMessage, (state, action) => {
1136
1138
  const message = {
1139
+ id: action.payload.id,
1137
1140
  senderId: action.payload.senderId,
1141
+ parentId: action.payload.parentId,
1138
1142
  timestamp: action.payload.timestamp,
1139
1143
  text: action.payload.text,
1144
+ sig: action.payload.sig,
1145
+ removed: false,
1140
1146
  };
1141
1147
  return Object.assign(Object.assign({}, state), { chatMessages: [...state.chatMessages, message] });
1142
1148
  });
1149
+ builder.addCase(signalEvents.chatMessageRemoved, (state, action) => {
1150
+ return Object.assign(Object.assign({}, state), { chatMessages: state.chatMessages.map((m) => {
1151
+ return Object.assign(Object.assign({}, m), (m.id === action.payload.id && {
1152
+ removed: true,
1153
+ }));
1154
+ }) });
1155
+ });
1143
1156
  },
1144
1157
  });
1145
1158
  const doSendChatMessage = createRoomConnectedThunk((payload) => (_, getState) => {
1146
1159
  const state = getState();
1147
1160
  const socket = selectSignalConnectionRaw(state).socket;
1148
1161
  const breakoutCurrentId = selectBreakoutCurrentId(state);
1149
- socket === null || socket === void 0 ? void 0 : socket.emit("chat_message", Object.assign(Object.assign({ text: payload.text }, (breakoutCurrentId && { breakoutGroup: breakoutCurrentId })), (payload.isBroadcast && { broadcast: true })));
1162
+ socket === null || socket === void 0 ? void 0 : socket.emit("chat_message", Object.assign(Object.assign(Object.assign({ text: payload.text }, (payload.parentId && { parentId: payload.parentId })), (breakoutCurrentId && { breakoutGroup: breakoutCurrentId })), (payload.isBroadcast && { broadcast: true })));
1163
+ });
1164
+ const doRemoveChatMessage = createRoomConnectedThunk(({ id, sig }) => (_, getState) => {
1165
+ const state = getState();
1166
+ const socket = selectSignalConnectionRaw(state).socket;
1167
+ socket === null || socket === void 0 ? void 0 : socket.emit("remove_chat_message", {
1168
+ id,
1169
+ sig,
1170
+ });
1150
1171
  });
1151
1172
  const selectChatRaw = (state) => state.chat;
1152
1173
  const selectChatMessages = (state) => state.chat.chatMessages;
@@ -2478,6 +2499,10 @@ startAppListening({
2478
2499
  actionCreator: signalEvents.chatMessage,
2479
2500
  effect: ({ payload }, { dispatch, getState }) => {
2480
2501
  const state = getState();
2502
+ const selfId = selectSelfId(state);
2503
+ if (selfId === payload.senderId) {
2504
+ return;
2505
+ }
2481
2506
  const client = selectRemoteParticipants(state).find(({ id }) => id === payload.senderId);
2482
2507
  if (!client) {
2483
2508
  console.warn("Could not find remote client that sent chat message");
@@ -2489,9 +2514,13 @@ startAppListening({
2489
2514
  props: {
2490
2515
  client,
2491
2516
  chatMessage: {
2517
+ id: payload.id,
2492
2518
  senderId: payload.senderId,
2519
+ parentId: payload.parentId,
2493
2520
  timestamp: payload.timestamp,
2494
2521
  text: payload.text,
2522
+ sig: payload.sig,
2523
+ removed: false,
2495
2524
  },
2496
2525
  },
2497
2526
  })));
@@ -4000,4 +4029,4 @@ function createServices() {
4000
4029
  };
4001
4030
  }
4002
4031
 
4003
- export { addAppListener, addSpotlight, appSlice, authorizationSlice, authorizationSliceInitialState, breakoutSlice, breakoutSliceInitialState, chatSlice, chatSliceInitialState, cloudRecordingSlice, connectionMonitorSlice, connectionMonitorSliceInitialState, connectionMonitorStarted, connectionMonitorStopped, createAppAsyncThunk, createAppAuthorizedThunk, createAppThunk, createAsyncRoomConnectedThunk, createAuthorizedRoomConnectedThunk, createReactor, createRemoteParticipant, createRoomConnectedThunk, createServices, createStore, createWebRtcEmitter, deviceBusy, deviceCredentialsSlice, deviceCredentialsSliceInitialState, deviceIdentified, deviceIdentifying, doAcceptWaitingParticipant, doAppStart, doAppStop, doBreakoutJoin, doCancelKnock, doClearNotifications, doConnectRoom, doConnectRtc, doDisconnectRtc, doEnableAudio, doEnableVideo, doEndMeeting, doGetDeviceCredentials, doHandleAcceptStreams, doHandleStreamingStarted, doHandleStreamingStopped, doKickParticipant, doKnockRoom, doLocalStreamEffect, doLockRoom, doOrganizationFetch, doRejectWaitingParticipant, doRemoveSpotlight, doRequestAudioEnable, doRequestVideoEnable, doRtcAnalyticsCustomEventsInitialize, doRtcManagerCreated, doRtcManagerInitialize, doRtcReportStreamResolution, doSendChatMessage, doSendClientMetadata, doSetDevice, doSetDisplayName, doSetLocalStickyReaction, doSetNotification, doSignalConnect, doSignalDisconnect, doSignalIdentifyDevice, doSpotlightParticipant, doStartCloudRecording, doStartConnectionMonitor, doStartLiveTranscription, doStartLocalMedia, doStartScreenshare, doStopCloudRecording, doStopConnectionMonitor, doStopLiveTranscription, doStopLocalMedia, doStopScreenshare, doSwitchLocalStream, doToggleCamera, doToggleLowDataMode, doUpdateDeviceList, initialCloudRecordingState, initialLiveTranscriptionState, initialLocalMediaState, initialNotificationsState, initialState$1 as initialState, isAcceptingStreams, isClientSpotlighted, listenerMiddleware, liveTranscriptionSlice, localMediaSlice, localMediaStopped, localParticipantSlice, localParticipantSliceInitialState, localScreenshareSlice, localScreenshareSliceInitialState, localStreamMetadataUpdated, notificationsSlice, observeStore, organizationSlice, organizationSliceInitialState, participantStreamAdded, participantStreamIdAdded, recordingRequestStarted, remoteParticipantsSlice, remoteParticipantsSliceInitialState, removeSpotlight, resolutionReported, roomConnectionSlice, roomConnectionSliceInitialState, roomSlice, roomSliceInitialState, rootReducer, rtcAnalyticsCustomEvents, rtcAnalyticsSlice, rtcAnalyticsSliceInitialState, rtcClientConnectionStatusChanged, rtcConnectionSlice, rtcConnectionSliceInitialState, rtcDisconnected, rtcDispatcherCreated, rtcEvents, rtcManagerCreated, rtcManagerDestroyed, rtcManagerInitialized, selectAllClientViews, selectAllClientViewsInCurrentGroup, selectAppDisplayName, selectAppExternalId, selectAppIgnoreBreakoutGroups, selectAppInitialConfig, selectAppIsActive, selectAppIsAssistant, selectAppIsAudioRecorder, selectAppIsDialIn, selectAppIsNodeSdk, selectAppRaw, selectAppRoomName, selectAppRoomUrl, selectAppUserAgent, selectAssistantKey, selectAuthorizationRoleName, selectBreakoutActive, selectBreakoutAssignments, selectBreakoutCurrentGroup, selectBreakoutCurrentId, selectBreakoutGroupedParticipants, selectBreakoutGroups, selectBreakoutInitiatedBy, selectBreakoutRaw, selectBusyDeviceIds, selectCameraDeviceError, selectCameraDevices, selectChatMessages, selectChatRaw, selectCloudRecordingError, selectCloudRecordingIsInitiator, selectCloudRecordingRaw, selectCloudRecordingStartedAt, selectCloudRecordingStatus, selectConnectionMonitorIsRunning, selectCurrentCameraDeviceId, selectCurrentMicrophoneDeviceId, selectCurrentSpeakerDeviceId, selectDeviceCredentialsRaw, selectDeviceId, selectHasFetchedDeviceCredentials, selectIsAcceptingStreams, selectIsAuthorizedToAskToSpeak, selectIsAuthorizedToEndMeeting, selectIsAuthorizedToKickClient, selectIsAuthorizedToLockRoom, selectIsAuthorizedToRequestAudioEnable, selectIsAuthorizedToRequestVideoEnable, selectIsAuthorizedToSpotlight, selectIsCameraEnabled, selectIsCloudRecording, selectIsLiveTranscription, selectIsLocalMediaStarting, selectIsLocalParticipantSpotlighted, selectIsLowDataModeEnabled, selectIsMicrophoneEnabled, selectIsSettingCameraDevice, selectIsSettingMicrophoneDevice, selectIsToggleCamera, selectLiveTranscriptionError, selectLiveTranscriptionIsInitiator, selectLiveTranscriptionRaw, selectLiveTranscriptionStartedAt, selectLiveTranscriptionStatus, selectLocalMediaBeforeEffectTracks, selectLocalMediaConstraintsOptions, selectLocalMediaDevices, selectLocalMediaIsSwitchingStream, selectLocalMediaOptions, selectLocalMediaOwnsStream, selectLocalMediaRaw, selectLocalMediaShouldStartWithOptions, selectLocalMediaShouldStop, selectLocalMediaStartError, selectLocalMediaStatus, selectLocalMediaStream, selectLocalParticipantBreakoutAssigned, selectLocalParticipantBreakoutGroup, selectLocalParticipantClientClaim, selectLocalParticipantDisplayName, selectLocalParticipantIsScreenSharing, selectLocalParticipantRaw, selectLocalParticipantStickyReaction, selectLocalParticipantView, selectLocalScreenshareRaw, selectLocalScreenshareStatus, selectLocalScreenshareStream, selectMicrophoneDeviceError, selectMicrophoneDevices, selectNotificationsEmitter, selectNotificationsEvents, selectNotificationsRaw, selectNumClients, selectNumParticipants, selectOrganizationId, selectOrganizationPreferences, selectOrganizationRaw, selectRemoteClientViews, selectRemoteClients, selectRemoteParticipants, selectRemoteParticipantsRaw, selectRoomConnectionError, selectRoomConnectionRaw, selectRoomConnectionSession, selectRoomConnectionSessionId, selectRoomConnectionStatus, selectRoomIsLocked, selectRoomKey, selectRtcConnectionRaw, selectRtcDispatcherCreated, selectRtcIsCreatingDispatcher, selectRtcManager, selectRtcManagerInitialized, selectRtcStatus, selectScreenshares, selectSelfId, selectShouldConnectRoom, selectShouldConnectRtc, selectShouldConnectSignal, selectShouldDisconnectRtc, selectShouldFetchDeviceCredentials, selectShouldFetchOrganization, selectShouldIdentifyDevice, selectShouldInitializeRtc, selectShouldStartConnectionMonitor, selectShouldStopConnectionMonitor, selectSignalConnectionDeviceIdentified, selectSignalConnectionRaw, selectSignalConnectionSocket, selectSignalIsIdentifyingDevice, selectSignalStatus, selectSpeakerDevices, selectSpotlightedClientViews, selectSpotlights, selectSpotlightsRaw, selectStopCallbackFunction, selectStreamingRaw, selectStreamsToAccept, selectWaitingParticipants, selectWaitingParticipantsRaw, setBreakoutGroupAssigned, setCurrentCameraDeviceId, setCurrentMicrophoneDeviceId, setCurrentSpeakerDeviceId, setDisplayName, setLocalMediaOptions, setLocalMediaStream, setRoomKey, signalConnectionSlice, signalConnectionSliceInitialState, signalEvents, socketConnected, socketConnecting, socketDisconnected, socketReconnecting, spotlightsSlice, spotlightsSliceInitialState, startAppListening, stopScreenshare, streamIdForClient, streamStatusUpdated, streamingSlice, streamingSliceInitialState, toggleCameraEnabled, toggleLowDataModeEnabled, toggleMicrophoneEnabled, transcribingRequestStarted, updateReportedValues, waitingParticipantsSlice, waitingParticipantsSliceInitialState };
4032
+ export { addAppListener, addSpotlight, appSlice, authorizationSlice, authorizationSliceInitialState, breakoutSlice, breakoutSliceInitialState, chatSlice, chatSliceInitialState, cloudRecordingSlice, connectionMonitorSlice, connectionMonitorSliceInitialState, connectionMonitorStarted, connectionMonitorStopped, createAppAsyncThunk, createAppAuthorizedThunk, createAppThunk, createAsyncRoomConnectedThunk, createAuthorizedRoomConnectedThunk, createReactor, createRemoteParticipant, createRoomConnectedThunk, createServices, createStore, createWebRtcEmitter, deviceBusy, deviceCredentialsSlice, deviceCredentialsSliceInitialState, deviceIdentified, deviceIdentifying, doAcceptWaitingParticipant, doAppStart, doAppStop, doBreakoutJoin, doCancelKnock, doClearNotifications, doConnectRoom, doConnectRtc, doDisconnectRtc, doEnableAudio, doEnableVideo, doEndMeeting, doGetDeviceCredentials, doHandleAcceptStreams, doHandleStreamingStarted, doHandleStreamingStopped, doKickParticipant, doKnockRoom, doLocalStreamEffect, doLockRoom, doOrganizationFetch, doRejectWaitingParticipant, doRemoveChatMessage, doRemoveSpotlight, doRequestAudioEnable, doRequestVideoEnable, doRtcAnalyticsCustomEventsInitialize, doRtcManagerCreated, doRtcManagerInitialize, doRtcReportStreamResolution, doSendChatMessage, doSendClientMetadata, doSetDevice, doSetDisplayName, doSetLocalStickyReaction, doSetNotification, doSignalConnect, doSignalDisconnect, doSignalIdentifyDevice, doSpotlightParticipant, doStartCloudRecording, doStartConnectionMonitor, doStartLiveTranscription, doStartLocalMedia, doStartScreenshare, doStopCloudRecording, doStopConnectionMonitor, doStopLiveTranscription, doStopLocalMedia, doStopScreenshare, doSwitchLocalStream, doToggleCamera, doToggleLowDataMode, doUpdateDeviceList, initialCloudRecordingState, initialLiveTranscriptionState, initialLocalMediaState, initialNotificationsState, initialState$1 as initialState, isAcceptingStreams, isClientSpotlighted, listenerMiddleware, liveTranscriptionSlice, localMediaSlice, localMediaStopped, localParticipantSlice, localParticipantSliceInitialState, localScreenshareSlice, localScreenshareSliceInitialState, localStreamMetadataUpdated, notificationsSlice, observeStore, organizationSlice, organizationSliceInitialState, participantStreamAdded, participantStreamIdAdded, recordingRequestStarted, remoteParticipantsSlice, remoteParticipantsSliceInitialState, removeSpotlight, resolutionReported, roomConnectionSlice, roomConnectionSliceInitialState, roomSlice, roomSliceInitialState, rootReducer, rtcAnalyticsCustomEvents, rtcAnalyticsSlice, rtcAnalyticsSliceInitialState, rtcClientConnectionStatusChanged, rtcConnectionSlice, rtcConnectionSliceInitialState, rtcDisconnected, rtcDispatcherCreated, rtcEvents, rtcManagerCreated, rtcManagerDestroyed, rtcManagerInitialized, selectAllClientViews, selectAllClientViewsInCurrentGroup, selectAppDisplayName, selectAppExternalId, selectAppIgnoreBreakoutGroups, selectAppInitialConfig, selectAppIsActive, selectAppIsAssistant, selectAppIsAudioRecorder, selectAppIsDialIn, selectAppIsNodeSdk, selectAppRaw, selectAppRoomName, selectAppRoomUrl, selectAppUserAgent, selectAssistantKey, selectAuthorizationRoleName, selectBreakoutActive, selectBreakoutAssignments, selectBreakoutCurrentGroup, selectBreakoutCurrentId, selectBreakoutGroupedParticipants, selectBreakoutGroups, selectBreakoutInitiatedBy, selectBreakoutRaw, selectBusyDeviceIds, selectCameraDeviceError, selectCameraDevices, selectChatMessages, selectChatRaw, selectCloudRecordingError, selectCloudRecordingIsInitiator, selectCloudRecordingRaw, selectCloudRecordingStartedAt, selectCloudRecordingStatus, selectConnectionMonitorIsRunning, selectCurrentCameraDeviceId, selectCurrentMicrophoneDeviceId, selectCurrentSpeakerDeviceId, selectDeviceCredentialsRaw, selectDeviceId, selectHasFetchedDeviceCredentials, selectIsAcceptingStreams, selectIsAuthorizedToAskToSpeak, selectIsAuthorizedToEndMeeting, selectIsAuthorizedToKickClient, selectIsAuthorizedToLockRoom, selectIsAuthorizedToRequestAudioEnable, selectIsAuthorizedToRequestVideoEnable, selectIsAuthorizedToSpotlight, selectIsCameraEnabled, selectIsCloudRecording, selectIsLiveTranscription, selectIsLocalMediaStarting, selectIsLocalParticipantSpotlighted, selectIsLowDataModeEnabled, selectIsMicrophoneEnabled, selectIsSettingCameraDevice, selectIsSettingMicrophoneDevice, selectIsToggleCamera, selectLiveTranscriptionError, selectLiveTranscriptionIsInitiator, selectLiveTranscriptionRaw, selectLiveTranscriptionStartedAt, selectLiveTranscriptionStatus, selectLocalMediaBeforeEffectTracks, selectLocalMediaConstraintsOptions, selectLocalMediaDevices, selectLocalMediaIsSwitchingStream, selectLocalMediaOptions, selectLocalMediaOwnsStream, selectLocalMediaRaw, selectLocalMediaShouldStartWithOptions, selectLocalMediaShouldStop, selectLocalMediaStartError, selectLocalMediaStatus, selectLocalMediaStream, selectLocalParticipantBreakoutAssigned, selectLocalParticipantBreakoutGroup, selectLocalParticipantClientClaim, selectLocalParticipantDisplayName, selectLocalParticipantIsScreenSharing, selectLocalParticipantRaw, selectLocalParticipantStickyReaction, selectLocalParticipantView, selectLocalScreenshareRaw, selectLocalScreenshareStatus, selectLocalScreenshareStream, selectMicrophoneDeviceError, selectMicrophoneDevices, selectNotificationsEmitter, selectNotificationsEvents, selectNotificationsRaw, selectNumClients, selectNumParticipants, selectOrganizationId, selectOrganizationPreferences, selectOrganizationRaw, selectRemoteClientViews, selectRemoteClients, selectRemoteParticipants, selectRemoteParticipantsRaw, selectRoomConnectionError, selectRoomConnectionRaw, selectRoomConnectionSession, selectRoomConnectionSessionId, selectRoomConnectionStatus, selectRoomIsLocked, selectRoomKey, selectRtcConnectionRaw, selectRtcDispatcherCreated, selectRtcIsCreatingDispatcher, selectRtcManager, selectRtcManagerInitialized, selectRtcStatus, selectScreenshares, selectSelfId, selectShouldConnectRoom, selectShouldConnectRtc, selectShouldConnectSignal, selectShouldDisconnectRtc, selectShouldFetchDeviceCredentials, selectShouldFetchOrganization, selectShouldIdentifyDevice, selectShouldInitializeRtc, selectShouldStartConnectionMonitor, selectShouldStopConnectionMonitor, selectSignalConnectionDeviceIdentified, selectSignalConnectionRaw, selectSignalConnectionSocket, selectSignalIsIdentifyingDevice, selectSignalStatus, selectSpeakerDevices, selectSpotlightedClientViews, selectSpotlights, selectSpotlightsRaw, selectStopCallbackFunction, selectStreamingRaw, selectStreamsToAccept, selectWaitingParticipants, selectWaitingParticipantsRaw, setBreakoutGroupAssigned, setCurrentCameraDeviceId, setCurrentMicrophoneDeviceId, setCurrentSpeakerDeviceId, setDisplayName, setLocalMediaOptions, setLocalMediaStream, setRoomKey, signalConnectionSlice, signalConnectionSliceInitialState, signalEvents, socketConnected, socketConnecting, socketDisconnected, socketReconnecting, spotlightsSlice, spotlightsSliceInitialState, startAppListening, stopScreenshare, streamIdForClient, streamStatusUpdated, streamingSlice, streamingSliceInitialState, toggleCameraEnabled, toggleLowDataModeEnabled, toggleMicrophoneEnabled, transcribingRequestStarted, updateReportedValues, waitingParticipantsSlice, waitingParticipantsSliceInitialState };
@@ -73,7 +73,7 @@ const createReactor = (selectors, callback) => {
73
73
  });
74
74
  };
75
75
 
76
- const coreVersion = "1.10.19";
76
+ const coreVersion = "1.11.0";
77
77
 
78
78
  const initialState$1 = {
79
79
  displayName: null,
@@ -127,6 +127,7 @@ const signalEvents = {
127
127
  breakoutMoveToMain: createSignalEventAction("breakoutMoveToMain"),
128
128
  breakoutSessionUpdated: createSignalEventAction("breakoutSessionUpdated"),
129
129
  chatMessage: createSignalEventAction("chatMessage"),
130
+ chatMessageRemoved: createSignalEventAction("chatMessageRemoved"),
130
131
  clientLeft: createSignalEventAction("clientLeft"),
131
132
  clientKicked: createSignalEventAction("clientKicked"),
132
133
  clientMetadataReceived: createSignalEventAction("clientMetadataReceived"),
@@ -305,6 +306,7 @@ function forwardSocketEvents(socket, dispatch) {
305
306
  socket.on("audio_enable_requested", (payload) => dispatch(signalEvents.audioEnableRequested(payload)));
306
307
  socket.on("client_metadata_received", (payload) => dispatch(signalEvents.clientMetadataReceived(payload)));
307
308
  socket.on("chat_message", (payload) => dispatch(signalEvents.chatMessage(payload)));
309
+ socket.on("chat_message_removed", (payload) => dispatch(signalEvents.chatMessageRemoved(payload)));
308
310
  socket.on("disconnect", () => dispatch(signalEvents.disconnect()));
309
311
  socket.on("room_knocked", (payload) => dispatch(signalEvents.roomKnocked(payload)));
310
312
  socket.on("room_left", () => dispatch(signalEvents.roomLeft()));
@@ -1134,19 +1136,38 @@ const chatSlice = createSlice({
1134
1136
  extraReducers(builder) {
1135
1137
  builder.addCase(signalEvents.chatMessage, (state, action) => {
1136
1138
  const message = {
1139
+ id: action.payload.id,
1137
1140
  senderId: action.payload.senderId,
1141
+ parentId: action.payload.parentId,
1138
1142
  timestamp: action.payload.timestamp,
1139
1143
  text: action.payload.text,
1144
+ sig: action.payload.sig,
1145
+ removed: false,
1140
1146
  };
1141
1147
  return Object.assign(Object.assign({}, state), { chatMessages: [...state.chatMessages, message] });
1142
1148
  });
1149
+ builder.addCase(signalEvents.chatMessageRemoved, (state, action) => {
1150
+ return Object.assign(Object.assign({}, state), { chatMessages: state.chatMessages.map((m) => {
1151
+ return Object.assign(Object.assign({}, m), (m.id === action.payload.id && {
1152
+ removed: true,
1153
+ }));
1154
+ }) });
1155
+ });
1143
1156
  },
1144
1157
  });
1145
1158
  const doSendChatMessage = createRoomConnectedThunk((payload) => (_, getState) => {
1146
1159
  const state = getState();
1147
1160
  const socket = selectSignalConnectionRaw(state).socket;
1148
1161
  const breakoutCurrentId = selectBreakoutCurrentId(state);
1149
- socket === null || socket === void 0 ? void 0 : socket.emit("chat_message", Object.assign(Object.assign({ text: payload.text }, (breakoutCurrentId && { breakoutGroup: breakoutCurrentId })), (payload.isBroadcast && { broadcast: true })));
1162
+ socket === null || socket === void 0 ? void 0 : socket.emit("chat_message", Object.assign(Object.assign(Object.assign({ text: payload.text }, (payload.parentId && { parentId: payload.parentId })), (breakoutCurrentId && { breakoutGroup: breakoutCurrentId })), (payload.isBroadcast && { broadcast: true })));
1163
+ });
1164
+ const doRemoveChatMessage = createRoomConnectedThunk(({ id, sig }) => (_, getState) => {
1165
+ const state = getState();
1166
+ const socket = selectSignalConnectionRaw(state).socket;
1167
+ socket === null || socket === void 0 ? void 0 : socket.emit("remove_chat_message", {
1168
+ id,
1169
+ sig,
1170
+ });
1150
1171
  });
1151
1172
  const selectChatRaw = (state) => state.chat;
1152
1173
  const selectChatMessages = (state) => state.chat.chatMessages;
@@ -2478,6 +2499,10 @@ startAppListening({
2478
2499
  actionCreator: signalEvents.chatMessage,
2479
2500
  effect: ({ payload }, { dispatch, getState }) => {
2480
2501
  const state = getState();
2502
+ const selfId = selectSelfId(state);
2503
+ if (selfId === payload.senderId) {
2504
+ return;
2505
+ }
2481
2506
  const client = selectRemoteParticipants(state).find(({ id }) => id === payload.senderId);
2482
2507
  if (!client) {
2483
2508
  console.warn("Could not find remote client that sent chat message");
@@ -2489,9 +2514,13 @@ startAppListening({
2489
2514
  props: {
2490
2515
  client,
2491
2516
  chatMessage: {
2517
+ id: payload.id,
2492
2518
  senderId: payload.senderId,
2519
+ parentId: payload.parentId,
2493
2520
  timestamp: payload.timestamp,
2494
2521
  text: payload.text,
2522
+ sig: payload.sig,
2523
+ removed: false,
2495
2524
  },
2496
2525
  },
2497
2526
  })));
@@ -4000,4 +4029,4 @@ function createServices() {
4000
4029
  };
4001
4030
  }
4002
4031
 
4003
- export { addAppListener, addSpotlight, appSlice, authorizationSlice, authorizationSliceInitialState, breakoutSlice, breakoutSliceInitialState, chatSlice, chatSliceInitialState, cloudRecordingSlice, connectionMonitorSlice, connectionMonitorSliceInitialState, connectionMonitorStarted, connectionMonitorStopped, createAppAsyncThunk, createAppAuthorizedThunk, createAppThunk, createAsyncRoomConnectedThunk, createAuthorizedRoomConnectedThunk, createReactor, createRemoteParticipant, createRoomConnectedThunk, createServices, createStore, createWebRtcEmitter, deviceBusy, deviceCredentialsSlice, deviceCredentialsSliceInitialState, deviceIdentified, deviceIdentifying, doAcceptWaitingParticipant, doAppStart, doAppStop, doBreakoutJoin, doCancelKnock, doClearNotifications, doConnectRoom, doConnectRtc, doDisconnectRtc, doEnableAudio, doEnableVideo, doEndMeeting, doGetDeviceCredentials, doHandleAcceptStreams, doHandleStreamingStarted, doHandleStreamingStopped, doKickParticipant, doKnockRoom, doLocalStreamEffect, doLockRoom, doOrganizationFetch, doRejectWaitingParticipant, doRemoveSpotlight, doRequestAudioEnable, doRequestVideoEnable, doRtcAnalyticsCustomEventsInitialize, doRtcManagerCreated, doRtcManagerInitialize, doRtcReportStreamResolution, doSendChatMessage, doSendClientMetadata, doSetDevice, doSetDisplayName, doSetLocalStickyReaction, doSetNotification, doSignalConnect, doSignalDisconnect, doSignalIdentifyDevice, doSpotlightParticipant, doStartCloudRecording, doStartConnectionMonitor, doStartLiveTranscription, doStartLocalMedia, doStartScreenshare, doStopCloudRecording, doStopConnectionMonitor, doStopLiveTranscription, doStopLocalMedia, doStopScreenshare, doSwitchLocalStream, doToggleCamera, doToggleLowDataMode, doUpdateDeviceList, initialCloudRecordingState, initialLiveTranscriptionState, initialLocalMediaState, initialNotificationsState, initialState$1 as initialState, isAcceptingStreams, isClientSpotlighted, listenerMiddleware, liveTranscriptionSlice, localMediaSlice, localMediaStopped, localParticipantSlice, localParticipantSliceInitialState, localScreenshareSlice, localScreenshareSliceInitialState, localStreamMetadataUpdated, notificationsSlice, observeStore, organizationSlice, organizationSliceInitialState, participantStreamAdded, participantStreamIdAdded, recordingRequestStarted, remoteParticipantsSlice, remoteParticipantsSliceInitialState, removeSpotlight, resolutionReported, roomConnectionSlice, roomConnectionSliceInitialState, roomSlice, roomSliceInitialState, rootReducer, rtcAnalyticsCustomEvents, rtcAnalyticsSlice, rtcAnalyticsSliceInitialState, rtcClientConnectionStatusChanged, rtcConnectionSlice, rtcConnectionSliceInitialState, rtcDisconnected, rtcDispatcherCreated, rtcEvents, rtcManagerCreated, rtcManagerDestroyed, rtcManagerInitialized, selectAllClientViews, selectAllClientViewsInCurrentGroup, selectAppDisplayName, selectAppExternalId, selectAppIgnoreBreakoutGroups, selectAppInitialConfig, selectAppIsActive, selectAppIsAssistant, selectAppIsAudioRecorder, selectAppIsDialIn, selectAppIsNodeSdk, selectAppRaw, selectAppRoomName, selectAppRoomUrl, selectAppUserAgent, selectAssistantKey, selectAuthorizationRoleName, selectBreakoutActive, selectBreakoutAssignments, selectBreakoutCurrentGroup, selectBreakoutCurrentId, selectBreakoutGroupedParticipants, selectBreakoutGroups, selectBreakoutInitiatedBy, selectBreakoutRaw, selectBusyDeviceIds, selectCameraDeviceError, selectCameraDevices, selectChatMessages, selectChatRaw, selectCloudRecordingError, selectCloudRecordingIsInitiator, selectCloudRecordingRaw, selectCloudRecordingStartedAt, selectCloudRecordingStatus, selectConnectionMonitorIsRunning, selectCurrentCameraDeviceId, selectCurrentMicrophoneDeviceId, selectCurrentSpeakerDeviceId, selectDeviceCredentialsRaw, selectDeviceId, selectHasFetchedDeviceCredentials, selectIsAcceptingStreams, selectIsAuthorizedToAskToSpeak, selectIsAuthorizedToEndMeeting, selectIsAuthorizedToKickClient, selectIsAuthorizedToLockRoom, selectIsAuthorizedToRequestAudioEnable, selectIsAuthorizedToRequestVideoEnable, selectIsAuthorizedToSpotlight, selectIsCameraEnabled, selectIsCloudRecording, selectIsLiveTranscription, selectIsLocalMediaStarting, selectIsLocalParticipantSpotlighted, selectIsLowDataModeEnabled, selectIsMicrophoneEnabled, selectIsSettingCameraDevice, selectIsSettingMicrophoneDevice, selectIsToggleCamera, selectLiveTranscriptionError, selectLiveTranscriptionIsInitiator, selectLiveTranscriptionRaw, selectLiveTranscriptionStartedAt, selectLiveTranscriptionStatus, selectLocalMediaBeforeEffectTracks, selectLocalMediaConstraintsOptions, selectLocalMediaDevices, selectLocalMediaIsSwitchingStream, selectLocalMediaOptions, selectLocalMediaOwnsStream, selectLocalMediaRaw, selectLocalMediaShouldStartWithOptions, selectLocalMediaShouldStop, selectLocalMediaStartError, selectLocalMediaStatus, selectLocalMediaStream, selectLocalParticipantBreakoutAssigned, selectLocalParticipantBreakoutGroup, selectLocalParticipantClientClaim, selectLocalParticipantDisplayName, selectLocalParticipantIsScreenSharing, selectLocalParticipantRaw, selectLocalParticipantStickyReaction, selectLocalParticipantView, selectLocalScreenshareRaw, selectLocalScreenshareStatus, selectLocalScreenshareStream, selectMicrophoneDeviceError, selectMicrophoneDevices, selectNotificationsEmitter, selectNotificationsEvents, selectNotificationsRaw, selectNumClients, selectNumParticipants, selectOrganizationId, selectOrganizationPreferences, selectOrganizationRaw, selectRemoteClientViews, selectRemoteClients, selectRemoteParticipants, selectRemoteParticipantsRaw, selectRoomConnectionError, selectRoomConnectionRaw, selectRoomConnectionSession, selectRoomConnectionSessionId, selectRoomConnectionStatus, selectRoomIsLocked, selectRoomKey, selectRtcConnectionRaw, selectRtcDispatcherCreated, selectRtcIsCreatingDispatcher, selectRtcManager, selectRtcManagerInitialized, selectRtcStatus, selectScreenshares, selectSelfId, selectShouldConnectRoom, selectShouldConnectRtc, selectShouldConnectSignal, selectShouldDisconnectRtc, selectShouldFetchDeviceCredentials, selectShouldFetchOrganization, selectShouldIdentifyDevice, selectShouldInitializeRtc, selectShouldStartConnectionMonitor, selectShouldStopConnectionMonitor, selectSignalConnectionDeviceIdentified, selectSignalConnectionRaw, selectSignalConnectionSocket, selectSignalIsIdentifyingDevice, selectSignalStatus, selectSpeakerDevices, selectSpotlightedClientViews, selectSpotlights, selectSpotlightsRaw, selectStopCallbackFunction, selectStreamingRaw, selectStreamsToAccept, selectWaitingParticipants, selectWaitingParticipantsRaw, setBreakoutGroupAssigned, setCurrentCameraDeviceId, setCurrentMicrophoneDeviceId, setCurrentSpeakerDeviceId, setDisplayName, setLocalMediaOptions, setLocalMediaStream, setRoomKey, signalConnectionSlice, signalConnectionSliceInitialState, signalEvents, socketConnected, socketConnecting, socketDisconnected, socketReconnecting, spotlightsSlice, spotlightsSliceInitialState, startAppListening, stopScreenshare, streamIdForClient, streamStatusUpdated, streamingSlice, streamingSliceInitialState, toggleCameraEnabled, toggleLowDataModeEnabled, toggleMicrophoneEnabled, transcribingRequestStarted, updateReportedValues, waitingParticipantsSlice, waitingParticipantsSliceInitialState };
4032
+ export { addAppListener, addSpotlight, appSlice, authorizationSlice, authorizationSliceInitialState, breakoutSlice, breakoutSliceInitialState, chatSlice, chatSliceInitialState, cloudRecordingSlice, connectionMonitorSlice, connectionMonitorSliceInitialState, connectionMonitorStarted, connectionMonitorStopped, createAppAsyncThunk, createAppAuthorizedThunk, createAppThunk, createAsyncRoomConnectedThunk, createAuthorizedRoomConnectedThunk, createReactor, createRemoteParticipant, createRoomConnectedThunk, createServices, createStore, createWebRtcEmitter, deviceBusy, deviceCredentialsSlice, deviceCredentialsSliceInitialState, deviceIdentified, deviceIdentifying, doAcceptWaitingParticipant, doAppStart, doAppStop, doBreakoutJoin, doCancelKnock, doClearNotifications, doConnectRoom, doConnectRtc, doDisconnectRtc, doEnableAudio, doEnableVideo, doEndMeeting, doGetDeviceCredentials, doHandleAcceptStreams, doHandleStreamingStarted, doHandleStreamingStopped, doKickParticipant, doKnockRoom, doLocalStreamEffect, doLockRoom, doOrganizationFetch, doRejectWaitingParticipant, doRemoveChatMessage, doRemoveSpotlight, doRequestAudioEnable, doRequestVideoEnable, doRtcAnalyticsCustomEventsInitialize, doRtcManagerCreated, doRtcManagerInitialize, doRtcReportStreamResolution, doSendChatMessage, doSendClientMetadata, doSetDevice, doSetDisplayName, doSetLocalStickyReaction, doSetNotification, doSignalConnect, doSignalDisconnect, doSignalIdentifyDevice, doSpotlightParticipant, doStartCloudRecording, doStartConnectionMonitor, doStartLiveTranscription, doStartLocalMedia, doStartScreenshare, doStopCloudRecording, doStopConnectionMonitor, doStopLiveTranscription, doStopLocalMedia, doStopScreenshare, doSwitchLocalStream, doToggleCamera, doToggleLowDataMode, doUpdateDeviceList, initialCloudRecordingState, initialLiveTranscriptionState, initialLocalMediaState, initialNotificationsState, initialState$1 as initialState, isAcceptingStreams, isClientSpotlighted, listenerMiddleware, liveTranscriptionSlice, localMediaSlice, localMediaStopped, localParticipantSlice, localParticipantSliceInitialState, localScreenshareSlice, localScreenshareSliceInitialState, localStreamMetadataUpdated, notificationsSlice, observeStore, organizationSlice, organizationSliceInitialState, participantStreamAdded, participantStreamIdAdded, recordingRequestStarted, remoteParticipantsSlice, remoteParticipantsSliceInitialState, removeSpotlight, resolutionReported, roomConnectionSlice, roomConnectionSliceInitialState, roomSlice, roomSliceInitialState, rootReducer, rtcAnalyticsCustomEvents, rtcAnalyticsSlice, rtcAnalyticsSliceInitialState, rtcClientConnectionStatusChanged, rtcConnectionSlice, rtcConnectionSliceInitialState, rtcDisconnected, rtcDispatcherCreated, rtcEvents, rtcManagerCreated, rtcManagerDestroyed, rtcManagerInitialized, selectAllClientViews, selectAllClientViewsInCurrentGroup, selectAppDisplayName, selectAppExternalId, selectAppIgnoreBreakoutGroups, selectAppInitialConfig, selectAppIsActive, selectAppIsAssistant, selectAppIsAudioRecorder, selectAppIsDialIn, selectAppIsNodeSdk, selectAppRaw, selectAppRoomName, selectAppRoomUrl, selectAppUserAgent, selectAssistantKey, selectAuthorizationRoleName, selectBreakoutActive, selectBreakoutAssignments, selectBreakoutCurrentGroup, selectBreakoutCurrentId, selectBreakoutGroupedParticipants, selectBreakoutGroups, selectBreakoutInitiatedBy, selectBreakoutRaw, selectBusyDeviceIds, selectCameraDeviceError, selectCameraDevices, selectChatMessages, selectChatRaw, selectCloudRecordingError, selectCloudRecordingIsInitiator, selectCloudRecordingRaw, selectCloudRecordingStartedAt, selectCloudRecordingStatus, selectConnectionMonitorIsRunning, selectCurrentCameraDeviceId, selectCurrentMicrophoneDeviceId, selectCurrentSpeakerDeviceId, selectDeviceCredentialsRaw, selectDeviceId, selectHasFetchedDeviceCredentials, selectIsAcceptingStreams, selectIsAuthorizedToAskToSpeak, selectIsAuthorizedToEndMeeting, selectIsAuthorizedToKickClient, selectIsAuthorizedToLockRoom, selectIsAuthorizedToRequestAudioEnable, selectIsAuthorizedToRequestVideoEnable, selectIsAuthorizedToSpotlight, selectIsCameraEnabled, selectIsCloudRecording, selectIsLiveTranscription, selectIsLocalMediaStarting, selectIsLocalParticipantSpotlighted, selectIsLowDataModeEnabled, selectIsMicrophoneEnabled, selectIsSettingCameraDevice, selectIsSettingMicrophoneDevice, selectIsToggleCamera, selectLiveTranscriptionError, selectLiveTranscriptionIsInitiator, selectLiveTranscriptionRaw, selectLiveTranscriptionStartedAt, selectLiveTranscriptionStatus, selectLocalMediaBeforeEffectTracks, selectLocalMediaConstraintsOptions, selectLocalMediaDevices, selectLocalMediaIsSwitchingStream, selectLocalMediaOptions, selectLocalMediaOwnsStream, selectLocalMediaRaw, selectLocalMediaShouldStartWithOptions, selectLocalMediaShouldStop, selectLocalMediaStartError, selectLocalMediaStatus, selectLocalMediaStream, selectLocalParticipantBreakoutAssigned, selectLocalParticipantBreakoutGroup, selectLocalParticipantClientClaim, selectLocalParticipantDisplayName, selectLocalParticipantIsScreenSharing, selectLocalParticipantRaw, selectLocalParticipantStickyReaction, selectLocalParticipantView, selectLocalScreenshareRaw, selectLocalScreenshareStatus, selectLocalScreenshareStream, selectMicrophoneDeviceError, selectMicrophoneDevices, selectNotificationsEmitter, selectNotificationsEvents, selectNotificationsRaw, selectNumClients, selectNumParticipants, selectOrganizationId, selectOrganizationPreferences, selectOrganizationRaw, selectRemoteClientViews, selectRemoteClients, selectRemoteParticipants, selectRemoteParticipantsRaw, selectRoomConnectionError, selectRoomConnectionRaw, selectRoomConnectionSession, selectRoomConnectionSessionId, selectRoomConnectionStatus, selectRoomIsLocked, selectRoomKey, selectRtcConnectionRaw, selectRtcDispatcherCreated, selectRtcIsCreatingDispatcher, selectRtcManager, selectRtcManagerInitialized, selectRtcStatus, selectScreenshares, selectSelfId, selectShouldConnectRoom, selectShouldConnectRtc, selectShouldConnectSignal, selectShouldDisconnectRtc, selectShouldFetchDeviceCredentials, selectShouldFetchOrganization, selectShouldIdentifyDevice, selectShouldInitializeRtc, selectShouldStartConnectionMonitor, selectShouldStopConnectionMonitor, selectSignalConnectionDeviceIdentified, selectSignalConnectionRaw, selectSignalConnectionSocket, selectSignalIsIdentifyingDevice, selectSignalStatus, selectSpeakerDevices, selectSpotlightedClientViews, selectSpotlights, selectSpotlightsRaw, selectStopCallbackFunction, selectStreamingRaw, selectStreamsToAccept, selectWaitingParticipants, selectWaitingParticipantsRaw, setBreakoutGroupAssigned, setCurrentCameraDeviceId, setCurrentMicrophoneDeviceId, setCurrentSpeakerDeviceId, setDisplayName, setLocalMediaOptions, setLocalMediaStream, setRoomKey, signalConnectionSlice, signalConnectionSliceInitialState, signalEvents, socketConnected, socketConnecting, socketDisconnected, socketReconnecting, spotlightsSlice, spotlightsSliceInitialState, startAppListening, stopScreenshare, streamIdForClient, streamStatusUpdated, streamingSlice, streamingSliceInitialState, toggleCameraEnabled, toggleLowDataModeEnabled, toggleMicrophoneEnabled, transcribingRequestStarted, updateReportedValues, waitingParticipantsSlice, waitingParticipantsSliceInitialState };
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.10.19",
5
+ "version": "1.11.0",
6
6
  "license": "MIT",
7
7
  "publishConfig": {
8
8
  "access": "public"
@@ -60,13 +60,13 @@
60
60
  "typescript": "^5.8.3",
61
61
  "@whereby.com/eslint-config": "0.1.0",
62
62
  "@whereby.com/jest-config": "0.1.0",
63
- "@whereby.com/rollup-config": "0.1.1",
64
63
  "@whereby.com/prettier-config": "0.1.0",
64
+ "@whereby.com/rollup-config": "0.1.1",
65
65
  "@whereby.com/tsconfig": "0.1.0"
66
66
  },
67
67
  "dependencies": {
68
68
  "@reduxjs/toolkit": "^2.2.3",
69
- "@whereby.com/media": "9.1.1",
69
+ "@whereby.com/media": "9.2.0",
70
70
  "axios": "^1.11.0",
71
71
  "btoa": "^1.2.1",
72
72
  "events": "^3.3.0"