test(timeline): remove "custom" in handle_back_paginated_custom_event

This commit is contained in:
Benjamin Bouvier
2024-07-09 19:00:26 +02:00
parent d7cbd9d218
commit f7504b4ff2
3 changed files with 8 additions and 8 deletions

View File

@@ -296,7 +296,7 @@ async fn test_dedup_pagination() {
// back-paginated events, as they are missing `room_id`. However, the
// timeline doesn't care about that `room_id` and casts back to
// `Raw<AnySyncTimelineEvent>` before attempting to deserialize.
timeline.handle_back_paginated_custom_event(event.cast()).await;
timeline.handle_back_paginated_event(event.cast()).await;
let timeline_items = timeline.inner.items().await;
assert_eq!(timeline_items.len(), 2);

View File

@@ -253,7 +253,7 @@ impl TestTimeline {
txn_id
}
async fn handle_back_paginated_custom_event(&self, event: Raw<AnyTimelineEvent>) {
async fn handle_back_paginated_event(&self, event: Raw<AnyTimelineEvent>) {
let timeline_event = TimelineEvent::new(event.cast());
self.inner
.add_events_at(vec![timeline_event], TimelineEnd::Front, RemoteEventOrigin::Pagination)

View File

@@ -109,12 +109,12 @@ async fn test_read_receipts_updates_on_back_paginated_events() {
let f = EventFactory::new().room(room_id);
timeline
.handle_back_paginated_custom_event(
.handle_back_paginated_event(
f.text_msg("A").sender(*BOB).event_id(event_id!("$event_a")).into_raw_timeline(),
)
.await;
timeline
.handle_back_paginated_custom_event(
.handle_back_paginated_event(
f.text_msg("B")
.sender(*CAROL)
.event_id(event_id!("$event_with_bob_receipt"))
@@ -289,12 +289,12 @@ async fn test_read_receipts_updates_on_back_paginated_filtered_events() {
let f = EventFactory::new().room(room_id);
timeline
.handle_back_paginated_custom_event(
.handle_back_paginated_event(
f.text_msg("A").sender(*ALICE).event_id(event_id!("$event_a")).into_raw_timeline(),
)
.await;
timeline
.handle_back_paginated_custom_event(
.handle_back_paginated_event(
f.notice("B")
.sender(*CAROL)
.event_id(event_id!("$event_with_bob_receipt"))
@@ -312,7 +312,7 @@ async fn test_read_receipts_updates_on_back_paginated_filtered_events() {
// Add non-filtered event to show read receipts.
timeline
.handle_back_paginated_custom_event(
.handle_back_paginated_event(
f.text_msg("C").sender(*CAROL).event_id(event_id!("$event_c")).into_raw_timeline(),
)
.await;
@@ -606,7 +606,7 @@ async fn test_clear_read_receipts() {
// Old message via back-pagination.
timeline
.handle_back_paginated_custom_event(
.handle_back_paginated_event(
f.event(event_a_content)
.sender(*BOB)
.room(room_id)