Skip to content

Commit

Permalink
Merge pull request #46 from Onlineberatung/develop
Browse files Browse the repository at this point in the history
merge with OS
  • Loading branch information
tkuzynow authored Sep 18, 2023
2 parents 289be8a + 453d9c9 commit 7d84f52
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions services/statisticsservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
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,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;
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 All @@ -42,6 +46,7 @@ private StartVideoCallStatisticsEventMessage createStartVideoCallStatisticsEvent
.sessionId(sessionId)
.videoCallUuid(videoCallUuid)
.adviceSeekerId(adviceSeekerId)
.tenantId(tenantId)
.timestamp(CustomOffsetDateTime.nowInUtc());
}
}

0 comments on commit 7d84f52

Please sign in to comment.