Browse Source

rn: throw exception if default conference options set the room

See: https://github.com/jitsi/jitsi-meet/issues/4720
master
Saúl Ibarra Corretgé 6 years ago
parent
commit
ab4b6be9d7

+ 3
- 0
android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeet.java View File

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

+ 0
- 1
ios/sdk/src/JitsiMeet.h View File

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

+ 9
- 0
ios/sdk/src/JitsiMeet.m View File

@@ -179,6 +179,15 @@
179 179
     return _universalLinkDomains ? _universalLinkDomains : @[];
180 180
 }
181 181
 
182
+- (void)setDefaultConferenceOptions:(JitsiMeetConferenceOptions *)defaultConferenceOptions {
183
+    if (defaultConferenceOptions != nil && _defaultConferenceOptions.room != nil) {
184
+        @throw [NSException exceptionWithName:@"RuntimeError"
185
+                                       reason:@"'room' must be null in the default conference options"
186
+                                     userInfo:nil];
187
+    }
188
+    _defaultConferenceOptions = defaultConferenceOptions;
189
+}
190
+
182 191
 #pragma mark - Private API methods
183 192
 
184 193
 - (NSDictionary *)getDefaultProps {

Loading…
Cancel
Save