mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 15:51:23 +01:00
add constructor for users service
This commit is contained in:
parent
f771d319b2
commit
e06d126d4e
2 changed files with 9 additions and 8 deletions
|
|
@ -46,6 +46,13 @@ pub(crate) struct Service {
|
|||
}
|
||||
|
||||
impl Service {
|
||||
pub(crate) fn new(db: &'static dyn Data) -> Self {
|
||||
Self {
|
||||
db,
|
||||
connections: Mutex::new(BTreeMap::new()),
|
||||
}
|
||||
}
|
||||
|
||||
/// Check if a user has an account on this homeserver.
|
||||
pub(crate) fn exists(&self, user_id: &UserId) -> Result<bool> {
|
||||
self.db.exists(user_id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue