-
Notifications
You must be signed in to change notification settings - Fork 307
feat(ffi): add support for starting and responding to user verification requests #4618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -252,13 +252,13 @@ impl Room { | |
} | ||
|
||
pub async fn member(&self, user_id: String) -> Result<RoomMember, ClientError> { | ||
let user_id = UserId::parse(&*user_id).context("Invalid user id.")?; | ||
let user_id = UserId::parse(&*user_id)?; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a point in removing these? Perhaps it would make sense to have a helper that always applies this context to the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just looked at where I'm not sure it's worth wrapping it, I don't think I've ever seen one of these in practice and even if it were to happen the underlying ruma error is clear enough. |
||
let member = self.inner.get_member(&user_id).await?.context("User not found")?; | ||
Ok(member.try_into().context("Unknown state membership")?) | ||
} | ||
|
||
pub async fn member_avatar_url(&self, user_id: String) -> Result<Option<String>, ClientError> { | ||
let user_id = UserId::parse(&*user_id).context("Invalid user id.")?; | ||
let user_id = UserId::parse(&*user_id)?; | ||
let member = self.inner.get_member(&user_id).await?.context("User not found")?; | ||
let avatar_url_string = member.avatar_url().map(|m| m.to_string()); | ||
Ok(avatar_url_string) | ||
|
@@ -268,7 +268,7 @@ impl Room { | |
&self, | ||
user_id: String, | ||
) -> Result<Option<String>, ClientError> { | ||
let user_id = UserId::parse(&*user_id).context("Invalid user id.")?; | ||
let user_id = UserId::parse(&*user_id)?; | ||
let member = self.inner.get_member(&user_id).await?.context("User not found")?; | ||
let avatar_url_string = member.display_name().map(|m| m.to_owned()); | ||
Ok(avatar_url_string) | ||
|
Uh oh!
There was an error while loading. Please reload this page.