Move syncv3 typings event for user.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-07-27 01:43:59 +00:00
parent 6b7bf80de5
commit 66334bdd53
2 changed files with 19 additions and 20 deletions

View File

@@ -4,7 +4,6 @@ use futures::StreamExt;
use ruma::{
OwnedRoomId, OwnedUserId, RoomId, UserId,
api::federation::transactions::edu::{Edu, TypingContent},
events::SyncEphemeralRoomEvent,
};
use tokio::sync::{RwLock, broadcast};
use tuwunel_core::{
@@ -223,20 +222,6 @@ impl Service {
Ok(user_ids)
}
pub async fn typings_event_for_user(
&self,
room_id: &RoomId,
sender_user: &UserId,
) -> Result<SyncEphemeralRoomEvent<ruma::events::typing::TypingEventContent>> {
Ok(SyncEphemeralRoomEvent {
content: ruma::events::typing::TypingEventContent {
user_ids: self
.typing_users_for_user(room_id, sender_user)
.await?,
},
})
}
async fn federation_send(&self, room_id: &RoomId, user_id: &UserId, typing: bool) -> Result {
debug_assert!(
self.services.globals.user_is_local(user_id),