|
|
|
@ -9,7 +9,9 @@ use crate::clock::SimulatedSystemClock; |
|
|
|
use crate::clock::SystemClock;
|
|
|
|
use crate::control::Response as ControlResponse;
|
|
|
|
use crate::peer::PeerMap;
|
|
|
|
use crate::server::context::{ServerContext, ServerLoginInfo};
|
|
|
|
use crate::server::context::{
|
|
|
|
ServerContext, ServerLoggedInContext, ServerLoggedInContextOptions,
|
|
|
|
};
|
|
|
|
use crate::server::room::RoomMap;
|
|
|
|
use crate::server::user::UserMap;
|
|
|
|
use crate::Config;
|
|
|
|
@ -122,13 +124,15 @@ impl ContextBundle { |
|
|
|
peers: options.initial_state.peers,
|
|
|
|
},
|
|
|
|
// TODO: Do not login immediately, wait for a login event.
|
|
|
|
server: ServerContext::new_logged_in(
|
|
|
|
options.user_name.clone(),
|
|
|
|
ServerLoginInfo {
|
|
|
|
server: ServerContext::LoggedIn(ServerLoggedInContext::new(
|
|
|
|
server_request_tx.clone(),
|
|
|
|
ServerLoggedInContextOptions {
|
|
|
|
user_name: options.user_name.clone(),
|
|
|
|
motd: "unimplemented".to_string(),
|
|
|
|
request_tx: server_request_tx.clone(),
|
|
|
|
rooms: options.initial_state.rooms,
|
|
|
|
users: options.initial_state.users,
|
|
|
|
},
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
user_name: options.user_name,
|
|
|
|
server_request_tx,
|
|
|
|
control_response_tx,
|
|
|
|
|