diff --git a/Riot/Managers/Widgets/JSONModels/JitsiWidgetData.h b/Riot/Managers/Widgets/JSONModels/JitsiWidgetData.h index c4a03c122..902d11b89 100644 --- a/Riot/Managers/Widgets/JSONModels/JitsiWidgetData.h +++ b/Riot/Managers/Widgets/JSONModels/JitsiWidgetData.h @@ -34,6 +34,9 @@ NS_ASSUME_NONNULL_BEGIN // YES if the Jitsi conference is intended to be an audio-only call @property (nonatomic) BOOL isAudioOnly; +// Indicate the authentication supported by the Jitsi server if any otherwise nil if there is no authentication supported. +@property (nonatomic, nullable) NSString *authenticationType; + @end NS_ASSUME_NONNULL_END diff --git a/Riot/Managers/Widgets/JSONModels/JitsiWidgetData.m b/Riot/Managers/Widgets/JSONModels/JitsiWidgetData.m index 469fe5c7b..655c48337 100644 --- a/Riot/Managers/Widgets/JSONModels/JitsiWidgetData.m +++ b/Riot/Managers/Widgets/JSONModels/JitsiWidgetData.m @@ -29,6 +29,9 @@ BOOL isAudioOnly = NO; MXJSONModelSetBoolean(isAudioOnly, JSONDictionary[@"isAudioOnly"]) + NSString *authenticationType; + MXJSONModelSetString(authenticationType, JSONDictionary[@"auth"]); + // Sanitiy check if (!conferenceId) { @@ -39,17 +42,25 @@ model.domain = domain; model.conferenceId = conferenceId; model.isAudioOnly = isAudioOnly; + model.authenticationType = authenticationType; return model; } - (NSDictionary *)JSONDictionary { - return @{ - @"domain": _domain, - @"conferenceId": _conferenceId, - @"isAudioOnly": @(_isAudioOnly), - }; + NSMutableDictionary *jsonDictionary = [@{ + @"domain": _domain, + @"conferenceId": _conferenceId, + @"isAudioOnly": @(_isAudioOnly), + } mutableCopy]; + + if (_authenticationType) + { + jsonDictionary[@"auth"] = _authenticationType; + } + + return jsonDictionary; }