@mozaik-ai/core 4.2.0-beta.7 → 4.2.0-beta.8

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.js CHANGED
@@ -246,9 +246,6 @@ var Space = class _Space {
246
246
  }
247
247
  getParticipant(id) {
248
248
  const participant = this.getParticipants().find((p) => p.getId() === id);
249
- if (!participant) {
250
- throw new Error(`Participant ${id} not found`);
251
- }
252
249
  return participant;
253
250
  }
254
251
  removeParticipant(participant) {
@@ -322,13 +319,13 @@ function defineRuntime() {
322
319
  const createSpace = async (name) => {
323
320
  return await createSpaceUseCase.execute(name);
324
321
  };
325
- const participantJoinedUseCase = new ParticipantJoinUseCase(spaceRepository, eventPublisher);
322
+ const participantJoinUseCase = new ParticipantJoinUseCase(spaceRepository, eventPublisher);
326
323
  const join = async (spaceId, participant) => {
327
- return await participantJoinedUseCase.execute(spaceId, participant);
324
+ return await participantJoinUseCase.execute(spaceId, participant);
328
325
  };
329
- const participantLeftUseCase = new ParticipantLeaveUseCase(spaceRepository, eventPublisher);
326
+ const participantLeaveUseCase = new ParticipantLeaveUseCase(spaceRepository, eventPublisher);
330
327
  const leave = async (spaceId, participantId) => {
331
- return await participantLeftUseCase.execute(spaceId, participantId);
328
+ return await participantLeaveUseCase.execute(spaceId, participantId);
332
329
  };
333
330
  const sendMessageUseCase = new SendMessageUseCase(spaceRepository, eventPublisher);
334
331
  const sendMessage = async (spaceId, participantId, message) => {