소스 검색

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 년 전
부모
커밋
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 {

Loading…
취소
저장