mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
fix mtxchat login()
This commit is contained in:
parent
0fbd331f37
commit
65dcf64720
1 changed files with 6 additions and 2 deletions
|
|
@ -288,8 +288,8 @@ impl<'a> MtxChat<'a> {
|
|||
HTTPS,
|
||||
&self
|
||||
.get(USER_DOMAIN_KEY)
|
||||
.unwrap_or(Some(DOMAIN_MATRIX.to_string()))
|
||||
.unwrap_or("".to_string())
|
||||
.unwrap_or(None)
|
||||
.unwrap_or(DOMAIN_MATRIX.to_string())
|
||||
)
|
||||
.expect("failed to write server");
|
||||
if let Some(token) = &self.token {
|
||||
|
|
@ -338,6 +338,10 @@ impl<'a> MtxChat<'a> {
|
|||
log::info!("logged_in");
|
||||
} else {
|
||||
log::info!("login failed");
|
||||
// unset credentials to facilitate re-attempt
|
||||
self.unset(TOKEN_KEY).expect("failed to unset token");
|
||||
self.unset(USER_DOMAIN_KEY)
|
||||
.expect("failed to unset user domain");
|
||||
}
|
||||
self.logged_in
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue