Skip to content

Commit

Permalink
fix: pass tenantId for startVideoCall event
Browse files Browse the repository at this point in the history
  • Loading branch information
tkuzynow committed Sep 14, 2023
1 parent 7c8a057 commit a9f3983
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions services/statisticsservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ components:
type: string
description: The uuid of the video call
example: 123e4567-e89b-12d3-a456-556642440000
tenantId:
type: string
description: The id of the tenant
example: 12345

StopVideoCallStatisticsEventMessage:
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import de.caritas.cob.videoservice.api.service.statistics.event.StopVideoCallStatisticsEvent;
import de.caritas.cob.videoservice.api.service.video.VideoCallUrlGeneratorService;
import de.caritas.cob.videoservice.api.service.video.VideoRoomService;
import de.caritas.cob.videoservice.api.tenant.TenantContext;
import de.caritas.cob.videoservice.liveservice.generated.web.model.EventType;
import de.caritas.cob.videoservice.liveservice.generated.web.model.LiveEventMessage;
import de.caritas.cob.videoservice.liveservice.generated.web.model.VideoCallRequestDTO;
Expand Down Expand Up @@ -94,7 +95,7 @@ private VideoCallResponseDTO startOneToOneVideoCall(
UserRole.CONSULTANT,
sessionId,
videoCallUuid,
consultantSessionDto.getAskerId()));
consultantSessionDto.getAskerId(), TenantContext.getCurrentTenant()));

log.info("Started one to one video call for sessionId {}", sessionId);
return createVideoCallResponseDto;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
import de.caritas.cob.videoservice.statisticsservice.generated.web.model.StartVideoCallStatisticsEventMessage;
import de.caritas.cob.videoservice.statisticsservice.generated.web.model.UserRole;
import java.util.Optional;
import lombok.AllArgsConstructor;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;

@RequiredArgsConstructor
@AllArgsConstructor
public class StartVideoCallStatisticsEvent implements StatisticsEvent {

private static final EventType EVENT_TYPE = EventType.START_VIDEO_CALL;
Expand All @@ -21,6 +23,8 @@ public class StartVideoCallStatisticsEvent implements StatisticsEvent {
private @NonNull String videoCallUuid;
private @NonNull String adviceSeekerId;

private Long tenantId;

/** {@inheritDoc} */
@Override
public Optional<String> getPayload() {
Expand Down

0 comments on commit a9f3983

Please sign in to comment.