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

fix: Correct logic for sending broadcast messages when mismatch happens #14824

Merged
merged 1 commit into from
Mar 13, 2023

Conversation

atomrc
Copy link
Contributor

@atomrc atomrc commented Mar 13, 2023

When a message is broadcasted (without a conversation param), we need to create sessions for the clients we don't have a session with.
The previous return false would stop sending the message if there is a mismatch. Which is not the intended behaviour.

see https://wearezeta.atlassian.net/wiki/spaces/ENGINEERIN/pages/106660748/Use+case+setting+the+status#Step-2 for specs

If the backend didn't accept the message but returned a 412 missing clients, the response will contain a list of missing clients that were not included as recipients of the original message.

The client should create a session with those clients (which includes fetching prekeys) and then resend the message.

@atomrc atomrc merged commit 8ecc612 into dev Mar 13, 2023
@atomrc atomrc deleted the fix/broadcast branch March 13, 2023 13:27
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

4 participants