diff --git a/services/statisticsservice.yaml b/services/statisticsservice.yaml index 76d404e..37f58ff 100644 --- a/services/statisticsservice.yaml +++ b/services/statisticsservice.yaml @@ -132,6 +132,11 @@ components: type: string description: The uuid of the video call example: 123e4567-e89b-12d3-a456-556642440000 + tenantId: + type: integer + format: int64 + description: The id of the tenant + example: 12345 StopVideoCallStatisticsEventMessage: type: object diff --git a/src/main/java/de/caritas/cob/videoservice/api/facade/VideoCallFacade.java b/src/main/java/de/caritas/cob/videoservice/api/facade/VideoCallFacade.java index 18c2a06..780310c 100644 --- a/src/main/java/de/caritas/cob/videoservice/api/facade/VideoCallFacade.java +++ b/src/main/java/de/caritas/cob/videoservice/api/facade/VideoCallFacade.java @@ -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; @@ -94,7 +95,8 @@ 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; diff --git a/src/main/java/de/caritas/cob/videoservice/api/service/statistics/event/StartVideoCallStatisticsEvent.java b/src/main/java/de/caritas/cob/videoservice/api/service/statistics/event/StartVideoCallStatisticsEvent.java index e6ee9f6..8489c88 100644 --- a/src/main/java/de/caritas/cob/videoservice/api/service/statistics/event/StartVideoCallStatisticsEvent.java +++ b/src/main/java/de/caritas/cob/videoservice/api/service/statistics/event/StartVideoCallStatisticsEvent.java @@ -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; @@ -21,6 +23,8 @@ public class StartVideoCallStatisticsEvent implements StatisticsEvent { private @NonNull String videoCallUuid; private @NonNull String adviceSeekerId; + private Long tenantId; + /** {@inheritDoc} */ @Override public Optional getPayload() { @@ -42,6 +46,7 @@ private StartVideoCallStatisticsEventMessage createStartVideoCallStatisticsEvent .sessionId(sessionId) .videoCallUuid(videoCallUuid) .adviceSeekerId(adviceSeekerId) + .tenantId(tenantId) .timestamp(CustomOffsetDateTime.nowInUtc()); } }