@@ -141,12 +141,31 @@ impl From<EncryptionSystem> for matrix_sdk::widget::EncryptionSystem {
141
141
}
142
142
}
143
143
144
+ /// Defines the intent of showing the call.
145
+ ///
146
+ /// This controls whether to show or skip the lobby.
147
+ #[ derive( uniffi:: Enum , Clone ) ]
148
+ pub enum Intent {
149
+ /// The user wants to start a call.
150
+ StartCall ,
151
+ /// The user wants to join an existing call.
152
+ JoinExisting ,
153
+ }
154
+ impl From < Intent > for matrix_sdk:: widget:: Intent {
155
+ fn from ( value : Intent ) -> Self {
156
+ match value {
157
+ Intent :: StartCall => Self :: StartCall ,
158
+ Intent :: JoinExisting => Self :: JoinExisting ,
159
+ }
160
+ }
161
+ }
162
+
144
163
/// Properties to create a new virtual Element Call widget.
145
164
#[ derive( uniffi:: Record , Clone ) ]
146
165
pub struct VirtualElementCallWidgetOptions {
147
166
/// The url to the app.
148
167
///
149
- /// E.g. <https://call.element.io>, <https://call.element.dev>
168
+ /// E.g. <https://call.element.io>, <https://call.element.dev>, <https://call.element.dev/room>
150
169
pub element_call_url : String ,
151
170
152
171
/// The widget id.
@@ -189,11 +208,6 @@ pub struct VirtualElementCallWidgetOptions {
189
208
/// Default: `false`
190
209
pub app_prompt : Option < bool > ,
191
210
192
- /// Don't show the lobby and join the call immediately.
193
- ///
194
- /// Default: `false`
195
- pub skip_lobby : Option < bool > ,
196
-
197
211
/// Make it not possible to get to the calls list in the webview.
198
212
///
199
213
/// Default: `true`
@@ -202,13 +216,33 @@ pub struct VirtualElementCallWidgetOptions {
202
216
/// The font to use, to adapt to the system font.
203
217
pub font : Option < String > ,
204
218
205
- /// Can be used to pass a PostHog id to element call.
206
- pub analytics_id : Option < String > ,
207
-
208
219
/// The encryption system to use.
209
220
///
210
221
/// Use `EncryptionSystem::Unencrypted` to disable encryption.
211
222
pub encryption : EncryptionSystem ,
223
+
224
+ /// The intent of showing the call.
225
+ /// If the user wants to start a call or join an existing one.
226
+ /// Controls if the lobby is skipped or not.
227
+ pub intent : Option < Intent > ,
228
+
229
+ /// Do not show the screenshare button.
230
+ pub hide_screensharing : bool ,
231
+
232
+ /// Can be used to pass a PostHog id to element call.
233
+ pub posthog_user_id : Option < String > ,
234
+ /// The host of the posthog api.
235
+ pub posthog_api_host : Option < String > ,
236
+ /// The key for the posthog api.
237
+ pub posthog_api_key : Option < String > ,
238
+
239
+ /// The url to use for submitting rageshakes.
240
+ pub rageshake_submit_url : Option < String > ,
241
+
242
+ /// Sentry [DSN](https://docs.sentry.io/concepts/key-terms/dsn-explainer/)
243
+ pub sentry_dsn : Option < String > ,
244
+ /// Sentry [environment](https://docs.sentry.io/concepts/key-terms/key-terms/)
245
+ pub sentry_environment : Option < String > ,
212
246
}
213
247
214
248
impl From < VirtualElementCallWidgetOptions > for matrix_sdk:: widget:: VirtualElementCallWidgetOptions {
@@ -221,11 +255,17 @@ impl From<VirtualElementCallWidgetOptions> for matrix_sdk::widget::VirtualElemen
221
255
preload : value. preload ,
222
256
font_scale : value. font_scale ,
223
257
app_prompt : value. app_prompt ,
224
- skip_lobby : value. skip_lobby ,
225
258
confine_to_room : value. confine_to_room ,
226
259
font : value. font ,
227
- analytics_id : value. analytics_id ,
260
+ posthog_user_id : value. posthog_user_id ,
228
261
encryption : value. encryption . into ( ) ,
262
+ intent : value. intent . map ( Into :: into) ,
263
+ hide_screensharing : value. hide_screensharing ,
264
+ posthog_api_host : value. posthog_api_host ,
265
+ posthog_api_key : value. posthog_api_key ,
266
+ rageshake_submit_url : value. rageshake_submit_url ,
267
+ sentry_dsn : value. sentry_dsn ,
268
+ sentry_environment : value. sentry_environment ,
229
269
}
230
270
}
231
271
}
0 commit comments