- let chat_server = ChatServer::startup(
- pool.clone(),
- |_, _, _, _| Box::pin(x()),
- |_, _, _, _| Box::pin(x()),
- client.clone(),
- settings.clone(),
- secret.clone(),
- rate_limit_cell.clone(),
- )
- .start();
- LemmyContext::create(
- pool,
- chat_server,
- client,
- settings,
- secret,
- rate_limit_cell.clone(),
- )
+ let context = LemmyContext::create(pool, client, secret, rate_limit_cell.clone());
+ let config = FederationConfig::builder()
+ .domain("example.com")
+ .app_data(context)
+ .build()
+ .await
+ .unwrap();
+ config.to_request_data()