File tree 3 files changed +9
-6
lines changed
crates/matrix-sdk-ui/src/timeline
3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -723,7 +723,11 @@ impl<P: RoomDataProvider> TimelineInner<P> {
723
723
// reflected in the timeline, so we set all other pending events to
724
724
// cancelled.
725
725
//
726
- // TODO(bnjbvr): spooky action at a distance here^
726
+ // TODO(bnjbvr): spooky action at a distance here^. The sending task is the one
727
+ // deciding to clear the sending queue, so we're updating based on that implicit
728
+ // knowledge here. Instead, the sending queue should notify the timeline that
729
+ // it's deciding to not send those messages, and then only the
730
+ // timeline should mark these items as cancelled.
727
731
let items = & mut txn. items ;
728
732
let num_items = items. len ( ) ;
729
733
for idx in 0 ..num_items {
Original file line number Diff line number Diff line change @@ -586,7 +586,7 @@ impl Timeline {
586
586
| TimelineItemContent :: ProfileChange ( _)
587
587
| TimelineItemContent :: OtherState ( _)
588
588
| TimelineItemContent :: CallInvite => {
589
- error_return ! ( "Retrying state events/call invite is not currently supported" ) ;
589
+ error_return ! ( "Retrying state events/call invites is not currently supported" ) ;
590
590
}
591
591
TimelineItemContent :: FailedToParseMessageLike { .. }
592
592
| TimelineItemContent :: FailedToParseState { .. } => {
Original file line number Diff line number Diff line change @@ -115,7 +115,9 @@ async fn send_or_queue_msg(
115
115
return ;
116
116
}
117
117
118
- if room. state ( ) != RoomState :: Joined {
118
+ if room. state ( ) == RoomState :: Joined {
119
+ send_task. start ( room, msg) ;
120
+ } else {
119
121
info ! ( "Refusing to send message, room is not joined" ) ;
120
122
timeline
121
123
. update_event_send_state (
@@ -126,10 +128,7 @@ async fn send_or_queue_msg(
126
128
} ,
127
129
)
128
130
. await ;
129
- return ;
130
131
}
131
-
132
- send_task. start ( room, msg) ;
133
132
}
134
133
135
134
async fn handle_send_result (
You can’t perform that action at this time.
0 commit comments