mirror of https://github.com/OpenVidu/openvidu.git
add token role to participant event (CDR and webhook)
parent
066810be17
commit
ecd7e77d2d
|
@ -46,6 +46,7 @@ public class CDREventParticipant extends CDREventEnd {
|
|||
// 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());
|
||||
|
|
|
@ -42,6 +42,7 @@ import com.google.gson.JsonObject;
|
|||
|
||||
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 @@ public class WebhookIntegrationTest {
|
|||
|
||||
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");
|
||||
|
|
Loading…
Reference in New Issue