mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-15 13:16:56 +00:00
fix: Adjust sync watcher logic to be more explicit
This commit is contained in:
1 parent
3adeee04d7
commit
3467dffd94
22 files changed
+189
-249
No files matched your search
@@ -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(())
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user