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

Handle mls-welcome events, creating necessary data with core-crypto #WPB-12154 #111

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

spoonman01
Copy link
Contributor

  • Process event and check if new keyPackages are needed
  • Check if the conversation already exists when joining via commit
  • Check for key package replenishment during conversation.create and conversation.member.join
  • Add Mockito to test some simple replenishment and welcomeMessage in WireClientBase
  • Release on git tag instead of GitHub release, as other projects do
  • Fix Dokka not generating JavaDoc for CryptoMlsClient

PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

MLS is supported for previous conversations, but not new ones received through mls-welcome event

Solutions

Add mld-welcome handling

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

* Process event and check if new keyPackages are needed
* Check if the conversation already exists when joining via commit
* Check for key package replenishment during conversation.create and conversation.member.join
* Add Mockito to test some simple replenishment and welcomeMessage in WireClientBase
* Release on git tag instead of GitHub release, as other projects do
* Fix Dokka not generating JavaDoc for CryptoMlsClient
@spoonman01 spoonman01 requested a review from a team as a code owner November 19, 2024 14:42
@spoonman01 spoonman01 self-assigned this Nov 19, 2024
@echoes-hq echoes-hq bot added the echoes/initiative: federation-wire-cloud Activate Federation with MLS on Wire Cloud label Nov 19, 2024
Copy link
Contributor

@alexandreferris alexandreferris left a comment

Choose a reason for hiding this comment

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

Great work! Just have 1 comment on variable naming, but nothing much

Comment on lines +4 to +6
workflow_dispatch:
release:
types: [ published ]
Copy link
Contributor

Choose a reason for hiding this comment

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

🙌🏻

@@ -107,16 +117,22 @@ protected void handleMessage(UUID eventId, Payload payload, WireClient client) t
Logger.debug("conversation.create: bot: %s", botId);

systemMessage = getSystemMessage(eventId, payload);
Integer otherMembers = PREKEYS_DEFAULT_REPLENISH;
Copy link
Contributor

Choose a reason for hiding this comment

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

the naming suggests a list of Member, if possible would be great to have another naming, maybe something like preKeysSize or preKeysCount but also super open to suggestions

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed the name of the variable. You also made me realize that I can skip proteus or MLS key replenishment in some cases, so I changed that

* Replenish only the needed keys on conversation.create
* Minor refactoring
@spoonman01 spoonman01 merged commit 44a28bb into master Nov 19, 2024
3 checks passed
@alexandreferris alexandreferris deleted the WPB-12154 branch November 19, 2024 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
echoes/initiative: federation-wire-cloud Activate Federation with MLS on Wire Cloud
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants