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

Don't send every DataMessage unsealed #268

Merged
merged 1 commit into from
Dec 12, 2023

Conversation

direc85
Copy link
Contributor

@direc85 direc85 commented Dec 12, 2023

@Schmiddiii writes in Whisperfish Matrix channel:

I have a question to #263: If I understand your code correctly, you take the unidentified_access on every single DataMessage here, which means try_send_message always gets None as unidentified access. Am I misunderstanding something? Shouldn't it be something like if end_session { unidentified_access.take() }?

I took a look at the code, and I arrived at the same conclusion, and developed a fix for the logic. So: the code previously made every DataMessage be sent identified/unsealed, whereas the intention is to use identified/unsealed sending for 1) EndSession messages and 2) messages to other own devices.

This has already received some real-world testing, and seems to work fine. As such, I was asked to make it a PR, so here it is!

Copy link

codecov bot commented Dec 12, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2e3bd58) 3.65% compared to head (6821436) 3.65%.

Additional details and impacted files
@@          Coverage Diff          @@
##            main    #268   +/-   ##
=====================================
  Coverage   3.65%   3.65%           
=====================================
  Files         38      38           
  Lines       2818    2818           
=====================================
  Hits         103     103           
  Misses      2715    2715           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@shekohex shekohex requested a review from gferon December 12, 2023 14:16
@gferon gferon merged commit 38471db into whisperfish:main Dec 12, 2023
12 checks passed
@gferon
Copy link
Collaborator

gferon commented Dec 12, 2023

Thanks a lot for the fix!

Schmiddiii added a commit to Schmiddiii/presage that referenced this pull request Dec 12, 2023
This includes <whisperfish/libsignal-service-rs#268>, which should fix captcha errors when sending messages.
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