openvidu-server: fix possible JsonNull exception in Token class

pull/574/head
pabloFuente 2020-12-03 13:01:32 +01:00
parent 888448fa65
commit eedf393f6a
1 changed files with 1 additions and 1 deletions

View File

@ -161,7 +161,7 @@ public class Token {
protected JsonObject getConnectionPropertiesWithFinalJsonFormat() { protected JsonObject getConnectionPropertiesWithFinalJsonFormat() {
JsonObject json = this.connectionProperties.toJson(this.sessionId); JsonObject json = this.connectionProperties.toJson(this.sessionId);
json.remove("session"); json.remove("session");
json.addProperty("serverData", json.get("data").getAsString()); json.add("serverData", json.get("data"));
json.remove("data"); json.remove("data");
return json; return json;
} }