openvidu-server: remove city from Geolocation if null

pull/405/head
pabloFuente 2020-02-19 11:38:19 +01:00
parent 69ab47edc8
commit f23383008c
2 changed files with 6 additions and 2 deletions

View File

@ -897,7 +897,7 @@ public class KurentoSessionManager extends SessionManager {
String rtspConnectionId = kMediaOptions.getTypeOfVideo() + "_" + protocol + "_"
+ RandomStringUtils.randomAlphanumeric(4).toUpperCase() + "_" + url.getAuthority() + url.getPath();
rtspConnectionId = rtspConnectionId.replace("/", "_").replace("-", "").replace(".", "_");
rtspConnectionId = rtspConnectionId.replace("/", "_").replace("-", "").replace(".", "_").replace(":", "_");
rtspConnectionId = IdentifierPrefixes.IPCAM_ID + rtspConnectionId;
// Store a "fake" participant for the IpCam connection

View File

@ -39,7 +39,11 @@ public class GeoLocation {
@Override
public String toString() {
return this.city + ", " + this.country;
String location = this.country;
if (this.city != null) {
location = this.city + ", " + location;
}
return location;
}
}