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

SessionStoreExt::compute_safety_number #139

Merged
merged 1 commit into from
Mar 14, 2022
Merged

SessionStoreExt::compute_safety_number #139

merged 1 commit into from
Mar 14, 2022

Conversation

rubdos
Copy link
Member

@rubdos rubdos commented Mar 11, 2022

Helper method to bundle all the necessary SessionStore requests into computation of the safety number. Maybe some day we should get rid of the magical constants in here. 5200, really?

@rubdos rubdos requested a review from gferon March 11, 2022 23:48
@rubdos
Copy link
Member Author

rubdos commented Mar 12, 2022

@gferon, when you'd review, have a look at the new clippy warning about SessionExt not being able to be made into an object.

@gferon
Copy link
Collaborator

gferon commented Mar 14, 2022

SessionExt not being able to be made into an object.

At this stage, since we use those functionalities everywhere, what about simply merging the traits?

Copy link
Collaborator

@gferon gferon left a comment

Choose a reason for hiding this comment

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

LGTM, one minor comment that you can disregard if you think that's ok.

return uuid.to_string();
}
unreachable!(
"an address requires either a UUID or a E164 phone number"
Copy link
Collaborator

Choose a reason for hiding this comment

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

technically since ServiceAddress is public, you could build it in an invalid state... do we really want this? (I know we have a few panics here and there in the lib, but maybe we can try avoiding new ones?).

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm, then I'd rather have the initializer set to private at some point in the future.

@rubdos
Copy link
Member Author

rubdos commented Mar 14, 2022

The reason we have an extension trait is because the other traits are in libsignal-client, no?

@rubdos rubdos merged commit 3960aca into master Mar 14, 2022
@rubdos rubdos deleted the safety-number branch March 14, 2022 09:43
@gferon
Copy link
Collaborator

gferon commented Mar 14, 2022

The reason we have an extension trait is because the other traits are in libsignal-client, no?

Indeed, I just forgot about it 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants