fix: Adjust sync watcher logic to be more explicit

This commit is contained in:
Ginger authored and Ellis Git committed 2026-07-05 00:42:44 +00:00
1 parent 3adeee04d7
commit 3467dffd94
22 files changed
+189 -249

No files matched your search

+5 -1
View File
@@ -16,7 +16,7 @@ use ruma::{
};
use serde::Deserialize;
use crate::{Dep, globals};
use crate::{Dep, globals, sync};
#[derive(Debug)]
pub enum AnyRawAccountDataEvent {
@@ -36,6 +36,7 @@ struct Data {
struct Services {
globals: Dep<globals::Service>,
sync: Dep<sync::Service>,
}
impl crate::Service for Service {
@@ -43,6 +44,7 @@ impl crate::Service for Service {
Ok(Arc::new(Self {
services: Services {
globals: args.depend::<globals::Service>("globals"),
sync: args.depend::<sync::Service>("sync"),
},
db: Data {
roomuserdataid_accountdata: args.db["roomuserdataid_accountdata"].clone(),
@@ -84,6 +86,8 @@ impl Service {
self.db.roomuserdataid_accountdata.remove(&prev);
}
self.services.sync.wake(user_id).await;
Ok(())
}