Merge pull request #9855 from pedrobmarin/fix-voice-bridge-compare
Fix voice bridge compare
This commit is contained in:
commit
c33ed683f3
@ -36,6 +36,10 @@ public class ApiErrors {
|
||||
errors.add(new String[] {"NotUniqueMeetingID", "A meeting already exists with that meeting ID. Please use a different meeting ID."});
|
||||
}
|
||||
|
||||
public void nonUniqueVoiceBridgeError() {
|
||||
errors.add(new String[] {"nonUniqueVoiceBridge", "The selected voice bridge is already in use."});
|
||||
}
|
||||
|
||||
public void invalidMeetingIdError() {
|
||||
errors.add(new String[] {"invalidMeetingId", "The meeting ID that you supplied did not match any existing meetings"});
|
||||
}
|
||||
|
@ -444,7 +444,7 @@ public class MeetingService implements MessageListener {
|
||||
return null;
|
||||
for (Map.Entry<String, Meeting> entry : meetings.entrySet()) {
|
||||
Meeting m = entry.getValue();
|
||||
if (m.getTelVoice() == telVoice) {
|
||||
if (telVoice.equals(m.getTelVoice())) {
|
||||
if (!m.isForciblyEnded())
|
||||
return m;
|
||||
}
|
||||
@ -457,7 +457,7 @@ public class MeetingService implements MessageListener {
|
||||
return null;
|
||||
for (Map.Entry<String, Meeting> entry : meetings.entrySet()) {
|
||||
Meeting m = entry.getValue();
|
||||
if (m.getWebVoice() == webVoice) {
|
||||
if (webVoice.equals(m.getWebVoice())) {
|
||||
if (!m.isForciblyEnded())
|
||||
return m;
|
||||
}
|
||||
|
@ -181,7 +181,7 @@ class ApiController {
|
||||
Meeting existingWebVoice = meetingService.getNotEndedMeetingWithWebVoice(newMeeting.getWebVoice());
|
||||
if (existingTelVoice != null || existingWebVoice != null) {
|
||||
log.error "VoiceBridge already in use by another meeting (different meetingId)"
|
||||
errors.nonUniqueMeetingIdError()
|
||||
errors.nonUniqueVoiceBridgeError()
|
||||
respondWithErrors(errors)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user