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

Dev #5

Merged
merged 8 commits into from
Jan 20, 2020
Merged

Dev #5

merged 8 commits into from
Jan 20, 2020

Conversation

BuddahLD
Copy link
Contributor

No description provided.

…atchetClient, SecureChatContext, travis build setup
@@ -265,7 +265,7 @@ class KeysRotatorTest {
return false
}
storedOneTimeKeysIds.forEachIndexed { i, value ->
if (!cloudOneTimeKeysIds[i].contentEquals(value)) {
if (!cloudOneTimeKeysIds[i]!!.contentEquals(value)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should check a cloud key existing?

@@ -563,7 +559,7 @@ class SecureChat {
)
}

if (!ratchetMessage.sessionId.contentEquals(sessionId)) {
if (!ratchetMessage.sessionId!!.contentEquals(sessionId)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

RatchetGroupMessage could be created with a default constructor and passed to this method. In this case process would be failed. Let's check sessionId is not null

Copy link
Contributor Author

@BuddahLD BuddahLD Jan 20, 2020

Choose a reason for hiding this comment

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

sessionId is a mandatory property? should we throw a NullArgumentException or smth if it's null?

Copy link
Contributor

Choose a reason for hiding this comment

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

I would throw IllegalArgumentException

file.delete()

val deleted = file.delete()
if (!deleted) throw FileDeletionException()
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's add file name to exception message

@BuddahLD BuddahLD merged commit 54d4b25 into master Jan 20, 2020
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.

2 participants