Skip to content

Commit

Permalink
chore(ffi): in Client::account_url return early when we're not an o…
Browse files Browse the repository at this point in the history
…idc session

This avoids one spammy log for sessions not using oidc.
  • Loading branch information
bnjbvr committed Oct 31, 2024
1 parent 5158b39 commit f1de260
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bindings/matrix-sdk-ffi/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,10 @@ impl Client {
&self,
action: Option<AccountManagementAction>,
) -> Result<Option<String>, ClientError> {
if !matches!(self.inner.auth_api(), Some(AuthApi::Oidc(..))) {
return Ok(None);
}

match self.inner.oidc().account_management_url(action.map(Into::into)).await {
Ok(url) => Ok(url.map(|u| u.to_string())),
Err(e) => {
Expand Down

0 comments on commit f1de260

Please sign in to comment.