Can start Matrix authentication from UI

This commit is contained in:
2025-11-05 18:27:41 +01:00
parent 3dab9f41d2
commit 37fad9ff55
12 changed files with 195 additions and 6 deletions

View File

@@ -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
})
}
}