fix(sync): Wake sync loops on typing updates

This commit is contained in:
Erwan Leboucher committed 2026-08-02 18:05:27 +02:00
1 parent 74591d24e5
commit 27a559a751
3 files changed
+13 -29

No files matched your search

+4 -6
View File
@@ -63,7 +63,6 @@ type KnownRoomUpdates = BTreeMap<String, BTreeSet<OwnedRoomId>>;
struct SyncCollection {
response: sync_events::v5::Response,
known_room_updates: KnownRoomUpdates,
todo_rooms: TodoRooms,
}
/// `POST /_matrix/client/unstable/org.matrix.simplified_msc3575/sync`
@@ -148,10 +147,6 @@ pub(crate) async fn sync_events_v5_route(
}
}
// Typing never wakes a sync loop, so collect it after the long poll settles.
collection.response.extensions.typing =
collect_typing_events(services, sender_user, &body, &collection.todo_rooms).await?;
commit_sync_collection(
services,
sender_user,
@@ -290,7 +285,10 @@ async fn collect_sync_response(
)
.await?;
Ok(SyncCollection { response, known_room_updates, todo_rooms })
response.extensions.typing =
collect_typing_events(services, sender_user, body, &todo_rooms).await?;
Ok(SyncCollection { response, known_room_updates })
}
fn response_is_empty(response: &sync_events::v5::Response) -> bool {