@@ -74,10 +74,13 @@ use crate::{
7474
7575mod deduplicator;
7676mod pagination;
77+ #[ cfg( feature = "e2e-encryption" ) ]
7778mod redecryptor;
7879mod room;
7980
8081pub use pagination:: { RoomPagination , RoomPaginationStatus } ;
82+ #[ cfg( feature = "e2e-encryption" ) ]
83+ pub use redecryptor:: { DecryptionRetryRequest , RedecryptorReport } ;
8184pub use room:: { RoomEventCache , RoomEventCacheSubscriber , ThreadEventCacheUpdate } ;
8285
8386/// An error observed in the [`EventCache`].
@@ -149,6 +152,10 @@ pub struct EventCacheDropHandles {
149152
150153 /// The task used to automatically shrink the linked chunks.
151154 auto_shrink_linked_chunk_task : JoinHandle < ( ) > ,
155+
156+ /// The task used to automatically redecrypt UTDs.
157+ #[ cfg( feature = "e2e-encryption" ) ]
158+ _redecryptor : redecryptor:: Redecryptor ,
152159}
153160
154161impl fmt:: Debug for EventCacheDropHandles {
@@ -258,10 +265,15 @@ impl EventCache {
258265 auto_shrink_receiver,
259266 ) ) ;
260267
268+ #[ cfg( feature = "e2e-encryption" ) ]
269+ let redecryptor = redecryptor:: Redecryptor :: new ( Arc :: downgrade ( & self . inner ) ) ;
270+
261271 Arc :: new ( EventCacheDropHandles {
262272 listen_updates_task,
263273 ignore_user_list_update_task,
264274 auto_shrink_linked_chunk_task,
275+ #[ cfg( feature = "e2e-encryption" ) ]
276+ _redecryptor : redecryptor,
265277 } )
266278 } ) ;
267279
0 commit comments