Skip to content
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

identity-service-api: Add 3PID bind endpoint. #621

Merged
merged 5 commits into from Jun 10, 2021
Merged

Conversation

Frinksy
Copy link
Contributor

@Frinksy Frinksy commented Jun 8, 2021

Resolves: #330

I've used pub signatures: BTreeMap<ServerNameBox, BTreeMap<ServerSigningKeyId, String>> but I feel like there might be a better type for that. Maybe something similar to ServerSignatures?

@Frinksy Frinksy requested a review from iinuwa as a code owner June 8, 2021 13:53
Use borrowed types and unwrap and fit comment on a single line.
Copy link
Member

@iinuwa iinuwa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good: I have a couple of changes for you.

(And sorry for the longer response time: I'll try to get to your PRs within 24-48 hours usually. If you want, you can feel free to submit multiple PRs at once. (Maybe in different modules so no rebasing is needed when we merge them.)

pub mxid: UserId,

/// A UNIX timestamp before which the association is not known to be valid.
pub not_before: UInt,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For time-based fields, we use the types from ruma_common::time. From the examples given in the spec, and the note here, this looks like it represents milliseconds. can you use the ruma_common::time::MillisecondsSinceUnixEpoch struct? Same with the other two below.

(Note to self: add references to these structs to the contributors guide.)

Copy link
Member

@jplatte jplatte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will let iinuwa re-review, but I only have one more style nit.

crates/ruma-identifiers/src/signatures.rs Outdated Show resolved Hide resolved
@jplatte jplatte merged commit ef7dd6d into ruma:main Jun 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

identity-service: Add 3PID bind endpoint
3 participants