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

runfix: 1:1 conversation with user without key packages #17371

Merged
merged 5 commits into from May 16, 2024

Conversation

PatrykBuniX
Copy link
Contributor

Description

Handles a 1:1 conversation with a user that don't have any key packages available to establish a MLS 1:1 conversation.

Screenshots/Screencast (for UI changes)

Checklist

  • PR has been self reviewed by the author;
  • Hard-to-understand areas of the code have been commented;
  • If it is a core feature, unit tests have been added;

@PatrykBuniX PatrykBuniX force-pushed the runfix/1to1-migration-no-keys branch from db972cf to 8d27e8a Compare May 15, 2024 13:38
Comment on lines -1506 to -1512
private readonly updateConversationReadOnlyState = async (
conversationEntity: Conversation,
conversationReadOnlyState: CONVERSATION_READONLY_STATE | null,
) => {
conversationEntity.readOnlyState(conversationReadOnlyState);
await this.saveConversationStateInDb(conversationEntity);
};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't need to save the state manually, there's a subscription that updates the db whenever the value changes. See https://github.com/wireapp/wire-webapp/blob/runfix/1to1-migration-no-keys/src/script/entity/Conversation.ts#L582

@PatrykBuniX PatrykBuniX marked this pull request as ready for review May 16, 2024 08:39
@PatrykBuniX PatrykBuniX requested review from otto-the-bot and a team as code owners May 16, 2024 08:39
Copy link

sonarcloud bot commented May 16, 2024

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
34.8% Duplication on New Code

See analysis details on SonarCloud

@PatrykBuniX PatrykBuniX merged commit 8dfc2cd into release/q1-2024 May 16, 2024
11 checks passed
@PatrykBuniX PatrykBuniX deleted the runfix/1to1-migration-no-keys branch May 16, 2024 10:33
PatrykBuniX added a commit that referenced this pull request May 16, 2024
* refactor: update conversaiton readonly state

* runfix: optionally do not allow unestablished mls 1:1

* feat: add a placeholder message for readonly 1:1 with a user without keys

* runfix: update copy

* test: readonly mls 1:1 no available keys
PatrykBuniX added a commit that referenced this pull request May 16, 2024
)

* refactor: update conversaiton readonly state

* runfix: optionally do not allow unestablished mls 1:1

* feat: add a placeholder message for readonly 1:1 with a user without keys

* runfix: update copy

* test: readonly mls 1:1 no available keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants