@@ -260,11 +260,12 @@ pub fn new_virtual_element_call_widget(
260
260
/// but should only be done as temporal workarounds until this function is
261
261
/// adjusted
262
262
#[ uniffi:: export]
263
- pub fn get_element_call_required_permissions ( ) -> WidgetCapabilities {
263
+ pub fn get_element_call_required_permissions ( own_user_id : String ) -> WidgetCapabilities {
264
264
use ruma:: events:: StateEventType ;
265
265
266
266
WidgetCapabilities {
267
267
read : vec ! [
268
+ WidgetEventFilter :: StateWithType { event_type: "org.matrix.msc3401.call" . to_owned( ) } ,
268
269
WidgetEventFilter :: StateWithType { event_type: StateEventType :: CallMember . to_string( ) } ,
269
270
WidgetEventFilter :: StateWithType { event_type: StateEventType :: RoomMember . to_string( ) } ,
270
271
WidgetEventFilter :: MessageLikeWithType {
@@ -275,11 +276,14 @@ pub fn get_element_call_required_permissions() -> WidgetCapabilities {
275
276
} ,
276
277
] ,
277
278
send : vec ! [
278
- WidgetEventFilter :: StateWithType { event_type: StateEventType :: CallMember . to_string( ) } ,
279
- WidgetEventFilter :: StateWithType {
279
+ WidgetEventFilter :: StateWithTypeAndStateKey {
280
+ event_type: StateEventType :: CallMember . to_string( ) ,
281
+ state_key: own_user_id. clone( ) ,
282
+ } ,
283
+ WidgetEventFilter :: MessageLikeWithType {
280
284
event_type: "org.matrix.rageshake_request" . to_owned( ) ,
281
285
} ,
282
- WidgetEventFilter :: StateWithType {
286
+ WidgetEventFilter :: MessageLikeWithType {
283
287
event_type: "io.element.call.encryption_keys" . to_owned( ) ,
284
288
} ,
285
289
] ,
0 commit comments