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

#5839 Fix parsing noname attachment with "message/global" content type #5844

Merged
merged 14 commits into from
Oct 21, 2024

Conversation

sosnovsky
Copy link
Collaborator

@sosnovsky sosnovsky commented Sep 25, 2024

This PR fixes incorrect parsing of noname attachments with message/global content type in plain messages.

close #5839


Tests (delete all except exactly one):

  • Tests added or updated

To be filled by reviewers

I have reviewed that this PR... (tick whichever items you personally focused on during this review):

  • addresses the issue it closes (if any)
  • code is readable and understandable
  • is accompanied with tests, or tests are not needed
  • is free of vulnerabilities
  • is documented clearly and usefully, or doesn't need documentation

@sosnovsky sosnovsky marked this pull request as ready for review October 16, 2024 10:58
@sosnovsky
Copy link
Collaborator Author

Hi @martgil, this PR is ready for review, thanks!

@martgil
Copy link
Collaborator

martgil commented Oct 17, 2024

Looks good to me – I just noticed one minor thing that could be improved, but it’s definitely not an issue.

@sosnovsky
Copy link
Collaborator Author

Looks good to me – I just noticed one minor thing that could be improved, but it’s definitely not an issue.

Hi @martgil, didn't find this minor thing, can you please describe what can be improved, thanks!

# Conflicts:
#	package-lock.json
@sosnovsky
Copy link
Collaborator Author

Looks good to me – I just noticed one minor thing that could be improved, but it’s definitely not an issue.

Hi @martgil, can you please describe mentioned improvement, thanks!

@martgil
Copy link
Collaborator

martgil commented Oct 21, 2024

Hi @martgil, can you please describe mentioned improvement, thanks!

Thanks @sosnovsky, I'm referring to this one: https://github.com/FlowCrypt/flowcrypt-browser/pull/5844/files#diff-fb2223e49c2a9c6a1085bdbe7eb8e17e3ee803132833d5e90d49faf5a3e8d2faR232-R237

I feel like this function should be renamed to shouldBeHidden(), in case of the following test:

if (renderStatus === 'hidden' || a.isHidden()) {
        nRenderedAttachments--;
      }

since there's an action that depends on it that requires reduction for attachment that is supposed to be hidden. The function isHidden() sounds like a test for attachment that is hidden or not. Not a big deal though.

@sosnovsky
Copy link
Collaborator Author

Agree on this, shouldBeHidden better describes original property, thanks for noticing!
I renamed it, please re-check

Copy link
Collaborator

@martgil martgil left a comment

Choose a reason for hiding this comment

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

all good now, thank you!

@sosnovsky sosnovsky merged commit b89fc54 into master Oct 21, 2024
13 checks passed
@sosnovsky sosnovsky deleted the 5839-noname-parsing-fix branch October 21, 2024 12:33
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.

Incorrect rendering of "Delivery Status Notification" email messages
2 participants