1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-12-05 10:42:14 +03:00

Refactor the matrix connection logic

Also make the display name available through the graphql api
This commit is contained in:
Quentin Gliech
2023-06-16 11:31:01 +02:00
parent 2a514cf452
commit 4181cbc9d5
25 changed files with 763 additions and 231 deletions

View File

@@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
use mas_matrix::HomeserverConnection;
use mas_storage::{BoxClock, BoxRepository, BoxRng, RepositoryError};
use crate::Requester;
@@ -19,6 +20,7 @@ use crate::Requester;
#[async_trait::async_trait]
pub trait State {
async fn repository(&self) -> Result<BoxRepository, RepositoryError>;
fn homeserver_connection(&self) -> &dyn HomeserverConnection<Error = anyhow::Error>;
fn clock(&self) -> BoxClock;
fn rng(&self) -> BoxRng;
}