Просмотр исходного кода

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 лет назад
Родитель
Сommit
ab4b6be9d7

+ 3
- 0
android/sdk/src/main/java/org/jitsi/meet/sdk/JitsiMeet.java Просмотреть файл

33
     }
33
     }
34
 
34
 
35
     public static void setDefaultConferenceOptions(JitsiMeetConferenceOptions options) {
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
         defaultConferenceOptions = options;
39
         defaultConferenceOptions = options;
37
     }
40
     }
38
 
41
 

+ 0
- 1
ios/sdk/src/JitsiMeet.h Просмотреть файл

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

+ 9
- 0
ios/sdk/src/JitsiMeet.m Просмотреть файл

179
     return _universalLinkDomains ? _universalLinkDomains : @[];
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
 #pragma mark - Private API methods
191
 #pragma mark - Private API methods
183
 
192
 
184
 - (NSDictionary *)getDefaultProps {
193
 - (NSDictionary *)getDefaultProps {

Загрузка…
Отмена
Сохранить