@@ -146,6 +146,10 @@ use crate::{Room, room::PushContext};
146146type SessionId < ' a > = & ' a str ;
147147type OwnedSessionId = String ;
148148
149+ type EventIdAndUtd = ( OwnedEventId , Raw < AnySyncTimelineEvent > ) ;
150+ type EventIdAndEvent = ( OwnedEventId , DecryptedRoomEvent ) ;
151+ type ResolvedUtd = ( OwnedEventId , DecryptedRoomEvent , Option < Vec < Action > > ) ;
152+
149153/// The information sent across the channel to the long-running task requesting
150154/// that the supplied set of sessions be retried.
151155#[ derive( Debug , Clone ) ]
@@ -206,7 +210,7 @@ impl EventCache {
206210 & self ,
207211 room_id : & RoomId ,
208212 session_id : SessionId < ' _ > ,
209- ) -> Result < Vec < ( OwnedEventId , Raw < AnySyncTimelineEvent > ) > , EventCacheError > {
213+ ) -> Result < Vec < EventIdAndUtd > , EventCacheError > {
210214 let filter = |event : TimelineEvent | {
211215 let event_id = event. event_id ( ) ;
212216
@@ -231,7 +235,7 @@ impl EventCache {
231235 & self ,
232236 room_id : & RoomId ,
233237 session_id : SessionId < ' _ > ,
234- ) -> Result < Vec < ( OwnedEventId , DecryptedRoomEvent ) > , EventCacheError > {
238+ ) -> Result < Vec < EventIdAndEvent > , EventCacheError > {
235239 let filter = |event : TimelineEvent | {
236240 let event_id = event. event_id ( ) ;
237241
@@ -264,7 +268,7 @@ impl EventCache {
264268 async fn on_resolved_utds (
265269 & self ,
266270 room_id : & RoomId ,
267- events : Vec < ( OwnedEventId , DecryptedRoomEvent , Option < Vec < Action > > ) > ,
271+ events : Vec < ResolvedUtd > ,
268272 ) -> Result < ( ) , EventCacheError > {
269273 if events. is_empty ( ) {
270274 trace ! ( "No events were redecrypted or updated, nothing to replace" ) ;
0 commit comments