From 770c77ee812af4d8f77353df9b7c2f309e2b305a Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Sat, 7 May 2022 12:48:34 +0900 Subject: [PATCH 1/2] Move local feed before federated feed for non-logged-in users --- plume-models/src/timeline/mod.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/plume-models/src/timeline/mod.rs b/plume-models/src/timeline/mod.rs index e1f4c2e2..2bc87021 100644 --- a/plume-models/src/timeline/mod.rs +++ b/plume-models/src/timeline/mod.rs @@ -86,16 +86,6 @@ impl Timeline { .or(timeline_definition::user_id.is_null()), ) .load::(conn) - .map(|mut timelines| { - timelines.sort_by(|t1, t2| { - if t1.user_id.is_some() && t2.user_id.is_none() { - Ordering::Less - } else { - t1.id.cmp(&t2.id) - } - }); - timelines - }) .map_err(Error::from) } else { timeline_definition::table @@ -103,6 +93,16 @@ impl Timeline { .load::(conn) .map_err(Error::from) } + .map(|mut timelines| { + timelines.sort_by(|t1, t2| { + if t1.user_id.is_some() && t2.user_id.is_none() { + Ordering::Less + } else { + t1.id.cmp(&t2.id) + } + }); + timelines + }) } pub fn new_for_user( From 9ae231fcefe3bae56d304a167b00bf6b79ad1fc5 Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Sat, 7 May 2022 12:58:47 +0900 Subject: [PATCH 2/2] [skip ci]Update changelog --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c317352d..12b8298c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,12 +7,13 @@ ### Added - Basque language (#1013) +- Unit tests for ActivityPub (#1021) ### Changed - Bump Rust to nightly 2022-01-26 (#1015) - Remove "Latest articles" timeline (#1069) -- Change order of timeline tabs (#1069, #1070) +- Change order of timeline tabs (#1069, #1070, #1072) ### Fixed @@ -20,7 +21,10 @@ - Add NOT NULL constraint to email_blocklist table fields (#1016) - Don't fill empty content when switching rich editor (#1017) - Fix accept header (#1058) +- Render 404 page instead of 500 when data is not found (#1062) - Reuse reqwest client on broadcasting (#1059) +- Reduce broadcasting HTTP request at once to prevent them being timed out (#1068, #1071) +- Some ActivityPub data (#1021) ## [[0.7.1]] - 2022-01-12