Can start Matrix authentication from UI
This commit is contained in:
@@ -166,3 +166,19 @@ impl APIToken {
|
||||
(self.last_used + self.max_inactivity) < time_secs()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(serde::Serialize, Debug, Clone)]
|
||||
pub struct ExtendedUserInfo {
|
||||
#[serde(flatten)]
|
||||
pub user: User,
|
||||
pub matrix_user_id: Option<String>,
|
||||
}
|
||||
|
||||
impl ExtendedUserInfo {
|
||||
pub async fn from_user(user: User) -> anyhow::Result<Self> {
|
||||
Ok(Self {
|
||||
user,
|
||||
matrix_user_id: None, // TODO
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user