rn: throw exception if default conference options set the room

See: https://github.com/jitsi/jitsi-meet/issues/4720
pull/4724/head jitsi-meet_4026
Saúl Ibarra Corretgé 6 years ago committed by Saúl Ibarra Corretgé
parent c45ee0230f
commit ab4b6be9d7
  1. 3
      android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeet.java
  2. 1
      ios/sdk/src/JitsiMeet.h
  3. 9
      ios/sdk/src/JitsiMeet.m

@ -33,6 +33,9 @@ public class JitsiMeet {
}
public static void setDefaultConferenceOptions(JitsiMeetConferenceOptions options) {
if (options != null && options.getRoom() != null) {
throw new RuntimeException("'room' must be null in the default conference options");
}
defaultConferenceOptions = options;
}

@ -37,7 +37,6 @@
* List of domains used for universal linking.
*/
@property (copy, nonatomic, nullable) NSArray<NSString *> *universalLinkDomains;
/**
* Default conference options used for all conferences. These options will be merged
* with those passed to JitsiMeetView.join when joining a conference.

@ -179,6 +179,15 @@
return _universalLinkDomains ? _universalLinkDomains : @[];
}
- (void)setDefaultConferenceOptions:(JitsiMeetConferenceOptions *)defaultConferenceOptions {
if (defaultConferenceOptions != nil && _defaultConferenceOptions.room != nil) {
@throw [NSException exceptionWithName:@"RuntimeError"
reason:@"'room' must be null in the default conference options"
userInfo:nil];
}
_defaultConferenceOptions = defaultConferenceOptions;
}
#pragma mark - Private API methods
- (NSDictionary *)getDefaultProps {

Loading…
Cancel
Save