diff --git a/openvidu-server/src/main/java/io/openvidu/server/cdr/CDREventParticipant.java b/openvidu-server/src/main/java/io/openvidu/server/cdr/CDREventParticipant.java index 4696abd493..9359196b38 100644 --- a/openvidu-server/src/main/java/io/openvidu/server/cdr/CDREventParticipant.java +++ b/openvidu-server/src/main/java/io/openvidu/server/cdr/CDREventParticipant.java @@ -46,6 +46,7 @@ public JsonObject toJson() { // TODO: remove deprecated "participantId" when possible json.addProperty("participantId", this.participant.getParticipantPublicId()); json.addProperty("connectionId", this.participant.getParticipantPublicId()); + json.addProperty("role", this.participant.getToken().getRole().toString()); json.addProperty("location", this.participant.getLocation().toString()); json.addProperty("ip", this.participant.getLocation().getIp()); json.addProperty("platform", this.participant.getPlatform()); diff --git a/openvidu-server/src/test/java/io/openvidu/server/test/integration/WebhookIntegrationTest.java b/openvidu-server/src/test/java/io/openvidu/server/test/integration/WebhookIntegrationTest.java index 2bf029ca2b..69d4e59d35 100644 --- a/openvidu-server/src/test/java/io/openvidu/server/test/integration/WebhookIntegrationTest.java +++ b/openvidu-server/src/test/java/io/openvidu/server/test/integration/WebhookIntegrationTest.java @@ -42,6 +42,7 @@ import io.openvidu.client.internal.ProtocolElements; import io.openvidu.java.client.ConnectionProperties; +import io.openvidu.java.client.OpenViduRole; import io.openvidu.server.cdr.CallDetailRecord; import io.openvidu.server.core.Participant; import io.openvidu.server.core.Session; @@ -154,6 +155,7 @@ void webhookEventAndRpcEventShouldNotInterfereWithEachOtherTest() throws Excepti Session session = kurentoSessionManager.getSessionWithNotActive(sessionId); Token token = new Token("token", sessionId, new ConnectionProperties.Builder().build(), null); + token.setRole(OpenViduRole.PUBLISHER); String participantPrivateId = "participantPrivateId"; Participant participant = kurentoSessionManager.newParticipant(session, participantPrivateId, token, null, mock(GeoLocation.class), "platform", "finalUserId");