@@ -17,7 +17,7 @@ use mas_data_model::{SessionExpirationConfig, SiteConfig};
1717use mas_email:: { MailTransport , Mailer } ;
1818use mas_handlers:: passwords:: PasswordManager ;
1919use mas_matrix:: { HomeserverConnection , ReadOnlyHomeserverConnection } ;
20- use mas_matrix_synapse:: SynapseConnection ;
20+ use mas_matrix_synapse:: { LegacySynapseConnection , SynapseConnection } ;
2121use mas_policy:: PolicyFactory ;
2222use mas_router:: UrlBuilder ;
2323use mas_storage:: { BoxRepositoryFactory , RepositoryAccess , RepositoryFactory } ;
@@ -469,14 +469,22 @@ pub fn homeserver_connection_from_config(
469469 http_client : reqwest:: Client ,
470470) -> Arc < dyn HomeserverConnection > {
471471 match config. kind {
472- HomeserverKind :: Synapse => Arc :: new ( SynapseConnection :: new (
472+ HomeserverKind :: Synapse | HomeserverKind :: SynapseLegacy => {
473+ Arc :: new ( LegacySynapseConnection :: new (
474+ config. homeserver . clone ( ) ,
475+ config. endpoint . clone ( ) ,
476+ config. secret . clone ( ) ,
477+ http_client,
478+ ) )
479+ }
480+ HomeserverKind :: SynapseModern => Arc :: new ( SynapseConnection :: new (
473481 config. homeserver . clone ( ) ,
474482 config. endpoint . clone ( ) ,
475483 config. secret . clone ( ) ,
476484 http_client,
477485 ) ) ,
478486 HomeserverKind :: SynapseReadOnly => {
479- let connection = SynapseConnection :: new (
487+ let connection = LegacySynapseConnection :: new (
480488 config. homeserver . clone ( ) ,
481489 config. endpoint . clone ( ) ,
482490 config. secret . clone ( ) ,
0 commit comments