@@ -17,7 +17,7 @@ use mas_data_model::{SessionExpirationConfig, SiteConfig};
17
17
use mas_email:: { MailTransport , Mailer } ;
18
18
use mas_handlers:: passwords:: PasswordManager ;
19
19
use mas_matrix:: { HomeserverConnection , ReadOnlyHomeserverConnection } ;
20
- use mas_matrix_synapse:: SynapseConnection ;
20
+ use mas_matrix_synapse:: { LegacySynapseConnection , SynapseConnection } ;
21
21
use mas_policy:: PolicyFactory ;
22
22
use mas_router:: UrlBuilder ;
23
23
use mas_storage:: { BoxRepositoryFactory , RepositoryAccess , RepositoryFactory } ;
@@ -469,14 +469,22 @@ pub fn homeserver_connection_from_config(
469
469
http_client : reqwest:: Client ,
470
470
) -> Arc < dyn HomeserverConnection > {
471
471
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 (
473
481
config. homeserver . clone ( ) ,
474
482
config. endpoint . clone ( ) ,
475
483
config. secret . clone ( ) ,
476
484
http_client,
477
485
) ) ,
478
486
HomeserverKind :: SynapseReadOnly => {
479
- let connection = SynapseConnection :: new (
487
+ let connection = LegacySynapseConnection :: new (
480
488
config. homeserver . clone ( ) ,
481
489
config. endpoint . clone ( ) ,
482
490
config. secret . clone ( ) ,
0 commit comments