mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-07 15:33:45 -04:00
test(timeline): get rid of custom handle_live_event
This is `TimelineInner::add_events_at` with fixed parameters.
This commit is contained in:
@@ -626,20 +626,6 @@ impl<P: RoomDataProvider> TimelineInner<P> {
|
||||
state.handle_ephemeral_events(events, &self.room_data_provider).await;
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub(super) async fn handle_live_event(&self, event: SyncTimelineEvent) {
|
||||
let mut state = self.state.write().await;
|
||||
state
|
||||
.add_remote_events_at(
|
||||
vec![event],
|
||||
TimelineEnd::Back,
|
||||
RemoteEventOrigin::Sync,
|
||||
&self.room_data_provider,
|
||||
&self.settings,
|
||||
)
|
||||
.await;
|
||||
}
|
||||
|
||||
/// Creates the local echo for an event we're sending.
|
||||
#[instrument(skip_all)]
|
||||
pub(super) async fn handle_local_event(
|
||||
|
||||
@@ -226,7 +226,7 @@ impl TestTimeline {
|
||||
|
||||
async fn handle_live_event(&self, event: Raw<AnySyncTimelineEvent>) {
|
||||
let event = SyncTimelineEvent::new(event);
|
||||
self.inner.handle_live_event(event).await
|
||||
self.inner.add_events_at(vec![event], TimelineEnd::Back, RemoteEventOrigin::Sync).await;
|
||||
}
|
||||
|
||||
async fn handle_local_event(&self, content: AnyMessageLikeEventContent) -> OwnedTransactionId {
|
||||
|
||||
Reference in New Issue
Block a user