Merge remote-tracking branch 'origin/main' into ap07
This commit is contained in:
commit
cfed02bbcf
@ -11,6 +11,8 @@
|
||||
### Changed
|
||||
|
||||
- Bump Rust to nightly 2022-01-26 (#1015)
|
||||
- Remove "Latest articles" timeline (#1069)
|
||||
- Change order of timeline tabs (#1069, #1070)
|
||||
- Migrate ActivityPub-related crates from activitypub 0.1 to activitystreams 0.7
|
||||
|
||||
### Fixed
|
||||
|
@ -18,7 +18,10 @@ use rocket::{
|
||||
response::{Responder, Response},
|
||||
Outcome,
|
||||
};
|
||||
use tokio::runtime;
|
||||
use tokio::{
|
||||
runtime,
|
||||
time::{sleep, Duration},
|
||||
};
|
||||
use tracing::{debug, warn};
|
||||
|
||||
use self::sign::Signable;
|
||||
@ -167,6 +170,9 @@ where
|
||||
let rx = rx.clone();
|
||||
let handle = rt.spawn(async move {
|
||||
while let Ok(request_builder) = rx.recv_async().await {
|
||||
// After broadcasting, target instance sends request to this instance.
|
||||
// Sleep here in order to reduce requests at once
|
||||
sleep(Duration::from_millis(500)).await;
|
||||
let _ = request_builder
|
||||
.send()
|
||||
.await
|
||||
|
@ -91,7 +91,7 @@ impl Timeline {
|
||||
if t1.user_id.is_some() && t2.user_id.is_none() {
|
||||
Ordering::Less
|
||||
} else {
|
||||
Ordering::Equal
|
||||
t1.id.cmp(&t2.id)
|
||||
}
|
||||
});
|
||||
timelines
|
||||
|
Loading…
Reference in New Issue
Block a user