Join the async prologue operations in sync v3.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
@@ -39,7 +39,7 @@ use tuwunel_core::{
|
|||||||
Error, Result, at,
|
Error, Result, at,
|
||||||
debug::INFO_SPAN_LEVEL,
|
debug::INFO_SPAN_LEVEL,
|
||||||
err, error,
|
err, error,
|
||||||
error::inspect_debug_log,
|
error::{inspect_debug_log, inspect_log},
|
||||||
extract_variant, is_equal_to,
|
extract_variant, is_equal_to,
|
||||||
matrix::{
|
matrix::{
|
||||||
Event,
|
Event,
|
||||||
@@ -53,7 +53,6 @@ use tuwunel_core::{
|
|||||||
self, BoolExt, FutureBoolExt, IterStream, ReadyExt, TryFutureExtExt,
|
self, BoolExt, FutureBoolExt, IterStream, ReadyExt, TryFutureExtExt,
|
||||||
future::{OptionStream, ReadyEqExt},
|
future::{OptionStream, ReadyEqExt},
|
||||||
math::ruma_from_u64,
|
math::ruma_from_u64,
|
||||||
result::LogErr,
|
|
||||||
stream::{BroadbandExt, Tools, TryExpect, WidebandExt},
|
stream::{BroadbandExt, Tools, TryExpect, WidebandExt},
|
||||||
},
|
},
|
||||||
warn,
|
warn,
|
||||||
@@ -129,15 +128,16 @@ pub(crate) async fn sync_events_route(
|
|||||||
) -> Result<sync_events::v3::Response, RumaResponse<UiaaResponse>> {
|
) -> Result<sync_events::v3::Response, RumaResponse<UiaaResponse>> {
|
||||||
let (sender_user, sender_device) = body.sender();
|
let (sender_user, sender_device) = body.sender();
|
||||||
|
|
||||||
services
|
let ping_presence = services
|
||||||
.presence
|
.presence
|
||||||
.maybe_ping_presence(sender_user, &body.body.set_presence)
|
.maybe_ping_presence(sender_user, &body.body.set_presence)
|
||||||
.await
|
.inspect_err(inspect_log)
|
||||||
.log_err()
|
|
||||||
.ok();
|
.ok();
|
||||||
|
|
||||||
// Record user as actively syncing for push suppression heuristic.
|
// Record user as actively syncing for push suppression heuristic.
|
||||||
services.presence.note_sync(sender_user).await;
|
let note_sync = services.presence.note_sync(sender_user);
|
||||||
|
|
||||||
|
join(ping_presence, note_sync).await;
|
||||||
|
|
||||||
let mut since = body
|
let mut since = body
|
||||||
.body
|
.body
|
||||||
|
|||||||
Reference in New Issue
Block a user