@@ -75,6 +75,8 @@ struct ElementCallParams {
75
75
sentry_environment : Option < String > ,
76
76
hide_screensharing : bool ,
77
77
controlled_media_devices : bool ,
78
+ /// Supported since Element Call v0.14.0.
79
+ send_notification_type : Option < NotificationType > ,
78
80
}
79
81
80
82
/// Defines if a call is encrypted and which encryption system should be used.
@@ -123,6 +125,16 @@ pub enum HeaderStyle {
123
125
None ,
124
126
}
125
127
128
+ /// Types of call notifications.
129
+ #[ derive( Debug , PartialEq , Serialize , uniffi:: Enum , Clone ) ]
130
+ #[ serde( rename_all = "snake_case" ) ]
131
+ pub enum NotificationType {
132
+ /// The receiving client should display a visual notification.
133
+ Notification ,
134
+ /// The receiving client should ring with an audible sound.
135
+ Ring ,
136
+ }
137
+
126
138
/// Properties to create a new virtual Element Call widget.
127
139
#[ derive( Debug , Default , uniffi:: Record , Clone ) ]
128
140
pub struct VirtualElementCallWidgetOptions {
@@ -223,6 +235,9 @@ pub struct VirtualElementCallWidgetOptions {
223
235
/// - `false`: the webview shows a a list of devices injected by the
224
236
/// client. (used on ios & android)
225
237
pub controlled_media_devices : bool ,
238
+ /// Whether and what type of notification Element Call should send, when
239
+ /// starting a call.
240
+ pub send_notification_type : Option < NotificationType > ,
226
241
}
227
242
228
243
impl WidgetSettings {
@@ -285,6 +300,7 @@ impl WidgetSettings {
285
300
rageshake_submit_url : props. rageshake_submit_url ,
286
301
hide_screensharing : props. hide_screensharing ,
287
302
controlled_media_devices : props. controlled_media_devices ,
303
+ send_notification_type : props. send_notification_type ,
288
304
} ;
289
305
290
306
let query =
0 commit comments