浏览代码

rn: throw exception if default conference options set the room

See: https://github.com/jitsi/jitsi-meet/issues/4720
master
Saúl Ibarra Corretgé 5 年前
父节点
当前提交
ab4b6be9d7
共有 3 个文件被更改,包括 12 次插入1 次删除
  1. 3
    0
      android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeet.java
  2. 0
    1
      ios/sdk/src/JitsiMeet.h
  3. 9
    0
      ios/sdk/src/JitsiMeet.m

+ 3
- 0
android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeet.java 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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 {

正在加载...
取消
保存