diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fa5d4ba..e8e842c1 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) - Migrate ActivityPub-related crates from activitypub 0.1 to activitystreams 0.7 ### Fixed @@ -21,7 +22,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 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(