Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add token role to participant event (CDR and webhook) #723

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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");
Expand Down