main,matrix: Read file paths from variables
This commit is contained in:
parent
695b152c7e
commit
9af48cfea1
2 changed files with 3 additions and 1 deletions
|
@ -68,9 +68,10 @@ async fn on_room_invite(event: StrippedStateEvent<RoomMemberEventContent>, room:
|
|||
|
||||
async fn client_login(username: String, password: String, device_id: Option<String>) -> Client {
|
||||
let user = <&UserId>::try_from(username.as_str()).unwrap();
|
||||
let path = "/etc/labadoor/sled_store";
|
||||
let client = Client::builder()
|
||||
.server_name(user.server_name())
|
||||
.sled_store("./sled_store", None)
|
||||
.sled_store(path, None)
|
||||
.unwrap()
|
||||
.build()
|
||||
.await
|
||||
|
|
|
@ -24,6 +24,7 @@ fn main() -> ExitCode {
|
|||
let module_result: Result<(), ()>;
|
||||
|
||||
let cli = cli::parse();
|
||||
let path = "/etc/labadoor/config.toml";
|
||||
let config = config::Config::builder()
|
||||
.add_source(config::File::with_name(path).required(false))
|
||||
.add_source(config::Environment::with_prefix("LABADOOR").separator("_"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue