@@ -18,7 +18,9 @@ use as_variant::as_variant;
18
18
use eyeball_im:: { ObservableVectorTransaction , ObservableVectorTransactionEntry } ;
19
19
use indexmap:: IndexMap ;
20
20
use matrix_sdk:: {
21
- crypto:: types:: events:: UtdCause , deserialized_responses:: EncryptionInfo , send_queue:: SendHandle ,
21
+ crypto:: types:: events:: UtdCause ,
22
+ deserialized_responses:: EncryptionState ,
23
+ send_queue:: SendHandle ,
22
24
} ;
23
25
use ruma:: {
24
26
events:: {
@@ -95,7 +97,7 @@ pub(super) enum Flow {
95
97
/// Where should this be added in the timeline.
96
98
position : TimelineItemPosition ,
97
99
/// Information about the encryption for this event.
98
- encryption_info : Option < EncryptionInfo > ,
100
+ encryption_state : EncryptionState ,
99
101
} ,
100
102
}
101
103
@@ -596,9 +598,9 @@ impl<'a, 'o> TimelineEventHandler<'a, 'o> {
596
598
let mut new_item = item. with_content ( new_content, edit_json) ;
597
599
598
600
if let EventTimelineItemKind :: Remote ( remote_event) = & item. kind {
599
- if let Flow :: Remote { encryption_info , .. } = & self . ctx . flow {
601
+ if let Flow :: Remote { encryption_state , .. } = & self . ctx . flow {
600
602
new_item = new_item. with_kind ( EventTimelineItemKind :: Remote (
601
- remote_event. with_encryption_info ( encryption_info . clone ( ) ) ,
603
+ remote_event. with_encryption_info ( encryption_state . as_encryption_info ( ) . cloned ( ) )
602
604
) ) ;
603
605
}
604
606
}
@@ -927,7 +929,7 @@ impl<'a, 'o> TimelineEventHandler<'a, 'o> {
927
929
}
928
930
. into ( ) ,
929
931
930
- Flow :: Remote { event_id, raw_event, position, txn_id, encryption_info , .. } => {
932
+ Flow :: Remote { event_id, raw_event, position, txn_id, encryption_state , .. } => {
931
933
let origin = match * position {
932
934
TimelineItemPosition :: Start { origin }
933
935
| TimelineItemPosition :: End { origin } => origin,
@@ -948,7 +950,7 @@ impl<'a, 'o> TimelineEventHandler<'a, 'o> {
948
950
read_receipts : self . ctx . read_receipts . clone ( ) ,
949
951
is_own : self . ctx . is_own_event ,
950
952
is_highlighted : self . ctx . is_highlighted ,
951
- encryption_info : encryption_info . clone ( ) ,
953
+ encryption_info : encryption_state . as_encryption_info ( ) . cloned ( ) ,
952
954
original_json : Some ( raw_event. clone ( ) ) ,
953
955
latest_edit_json : None ,
954
956
origin,
0 commit comments