Merge remote-tracking branch 'origin/main' into ap07

This commit is contained in:
Kitaiti Makoto
2022-05-07 13:04:47 +09:00
2 changed files with 15 additions and 11 deletions
+5 -1
View File
@@ -7,12 +7,13 @@
### Added ### Added
- Basque language (#1013) - Basque language (#1013)
- Unit tests for ActivityPub (#1021)
### Changed ### Changed
- Bump Rust to nightly 2022-01-26 (#1015) - Bump Rust to nightly 2022-01-26 (#1015)
- Remove "Latest articles" timeline (#1069) - 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 - Migrate ActivityPub-related crates from activitypub 0.1 to activitystreams 0.7
### Fixed ### Fixed
@@ -21,7 +22,10 @@
- Add NOT NULL constraint to email_blocklist table fields (#1016) - Add NOT NULL constraint to email_blocklist table fields (#1016)
- Don't fill empty content when switching rich editor (#1017) - Don't fill empty content when switching rich editor (#1017)
- Fix accept header (#1058) - Fix accept header (#1058)
- Render 404 page instead of 500 when data is not found (#1062)
- Reuse reqwest client on broadcasting (#1059) - 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 ## [[0.7.1]] - 2022-01-12
+7 -7
View File
@@ -86,6 +86,13 @@ impl Timeline {
.or(timeline_definition::user_id.is_null()), .or(timeline_definition::user_id.is_null()),
) )
.load::<Self>(conn) .load::<Self>(conn)
.map_err(Error::from)
} else {
timeline_definition::table
.filter(timeline_definition::user_id.is_null())
.load::<Self>(conn)
.map_err(Error::from)
}
.map(|mut timelines| { .map(|mut timelines| {
timelines.sort_by(|t1, t2| { timelines.sort_by(|t1, t2| {
if t1.user_id.is_some() && t2.user_id.is_none() { if t1.user_id.is_some() && t2.user_id.is_none() {
@@ -96,13 +103,6 @@ impl Timeline {
}); });
timelines timelines
}) })
.map_err(Error::from)
} else {
timeline_definition::table
.filter(timeline_definition::user_id.is_null())
.load::<Self>(conn)
.map_err(Error::from)
}
} }
pub fn new_for_user( pub fn new_for_user(